netsensia / pinnacle-sports-api
API Wrapper for the Pinnacle Sports API
v0.0.7
2018-03-05 16:11 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ^5.1.0
Requires (Dev)
- phpspec/phpspec: ~2.0
This package is not auto-updated.
Last update: 2024-11-13 19:50:58 UTC
README
A PHP Client wrapper for the Pinnacle Sports API (https://www.pinnacle.com/en/api/manual)
You will need an API key to use this client. This is the Base64 value of UTF-8 encoded username:password
Add to project using Composer
composer require "netsensia/pinnacle-sports-api:1.0.0"
Usage
$client = new Client($apiKey);
$sports = $client->getSports();
$leagues = $client->getLeagues(33); // 33 is the id for tennis, as obtained from getSports()
$fixtures = $client->getFixtures(33);
$odds = $client->getOdds(33);
A full list of available calls can be found by examining the ClientSpec.php file which contains the spec tests. Additional parameters can be seen in the Client.php file.
Development
Clone the repo and compose
git clone git@github.com:netsensia/pinnacle-sports-api
cd pinnacle-sports-api
php composer.phar install
Run the tests
Create a file called .apiKey in the root of the project and add your api key to it.
bin/phpspec run --format=pretty -vvv --stop-on-failure