Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.1 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.1 KB

Skybet PHP API

This is a simple PHP implementation for Skybet API.

Installation

You can either get the files from GIT or you can install the library via Composer. To use Composer, simply add the following to your composer.json file.

{
    "require": {
        "sharapov/skybet-php-api": "dev-master"
    }
}

How to use it?

To initialize the API, you'll need to pass an array with your application user.

require_once "../vendor/autoload.php";

$api = new \Sharapov\SkybetPHP\SkybetAPI( [
                                            'api_user'  => 'test',
                                          ] );

// Retrieve available event classes
$response = $api->classes()->get();

// Retrieve events list on certain event class
$response = $api->football()->get();

// Retrieve event document by event id
$response = $api->event('20739612');

// Retrieve market for event by id
 $response = $api->event('20739612', true)->market('86571269')->get();

print '<pre>';
print_r( $response );
print '</pre>';