Skip to content

sharapov-outsource/unibet-php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unibet PHP API

This is a simple PHP implementation for Unibet 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/unibet-php-api": "dev-master"
    }
}

How to use it?

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

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

$api = new \Sharapov\UnibetPHP\UnibetAPI( [
                                            'app_id'  => 'APP_ID',
                                            'app_key' => 'APP_KEY'
                                          ] );

// Request examples

// /sportsbook/groups
$response = $api->sportsbook()->groups()->json();

// /sportsbook/betoffer/event/{eventId}.{responseformat}
$response = $api->sportsbook()->betoffer()->event('EVENT_ID')->json();

// More examples are on https://developer.unibet.com/docs

print '<pre>';
print_r( json_decode($response->getBody()->getContents()) );
print '</pre>';

About

This is a simple PHP implementation for Unibet API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published