Request
NAME
WebService::FootballData::Request - Class for making HTTP requests on football-data.org
SYNOPSIS
use WebService::FootballData::Request;
my $request = WebService::FootballData::Request.new(
api_key => '12345',
content => 'compressed',
base_url => 'http://api.football-data.org/v1/'
);
my @leagues = $request.get: 'soccerseasons';
DESCRIPTION
Class that makes it easy to do HTTP requests on football-data.org.
ATTRIBUTES
api_key
API key provided by football-data.org, of type Str.
content
Response's shape, of type Str. As specified by football-data.org.
base_url
Base URL used for making HTTP requests, of type Str.
ua
A user agent object that does the WebService::FootballData::Role::UserAgent role. Defaults to an instance of WebService::FootballData::Facade::UserAgent.
METHODS
get
$request.get: 'teams/65/fixtures';
$request.get: 'teams/65/fixtures', params => :season(2014);
Takes:
A resource or an absolute URL, of type
Str.Named argument
params, of typeHash.
Returns the JSON response as Perl 6 data structure.
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/>.