Team
NAME
WebService::FootballData::Team - Class representing a football team
SYNOPSIS
use WebService::FootballData::Team;
my $team = WebService::FootballData::Team.new(
request => WebService::FootballData::Request.new,
links => {
self => href => "teams/65",
fixtures => href => "teams/65/fixtures"
players => href => "teams/65/players",
},
name => 'Manchester City FC'
);
my @players = $team.players;
DESCRIPTION
Class for creating objects that provide functionality for accessing team data.
team method of WebService::FootballData and teams method
of WebService::FootballData::League make use of team objects.
ATTRIBUTES
request
An object that does the WebService::FootballData::Role::Request role.
This is a required attribute.
links
A hash containing links provided by football-data.org.
This is a required attribute.
name
Name of the team, of type Str.
short_name
Short name of the team, of type Str.
code
Code of the team, of type Str.
squad_market_value
Squad market value of the team, of type Str.
crest_url
Crest URL of the team, of type Str.
METHODS
id
$team.id;
Returns the team's id, of type Int.
players
$team.players;
Returns the team's players: Array of WebService::FootballData::Team::Player instances.
fixtures
$team.fixtures: :timeframe<p20>;
$team.fixtures: :season(2014), :venue<home>;
Takes:
Named argument
seasonof typeInt.Named argument
timeframeof typeStr. A timeframe as defined by football-data.org.Named argument
venueof typeStr. A venue as defined by football-data.org.
Returns the team's fixtures: Array of WebService::FootballData::Fixtures::Fixture instances.
AUTHOR
Siavash Askari Nasr - http://ciavash.name/
COPYRIGHT AND LICENSE
Copyright Ā© 2016 Siavash Askari Nasr
This file is part of WebService::FootballData.
WebService::FootballData is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
WebService::FootballData is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with WebService::FootballData. If not, see <http://www.gnu.org/licenses/>.