2017 © Pedro Peláez
 

library unibet-php-api

A simple PHP implementation for Unibet's JSON API

image

sharapov/unibet-php-api

A simple PHP implementation for Unibet's JSON API

  • Tuesday, June 6, 2017
  • by sharapov-outsource
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Unibet PHP API

This is a simple PHP implementation for Unibet API., (*1)

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., (*2)

{
    "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., (*3)

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 '

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

The Versions

06/06 2017

dev-master

9999999-dev http://sharapov.biz/

A simple PHP implementation for Unibet's JSON API

  Sources   Download

GPL-3.0

The Requires

 

api json rest betting odds bookmaker unibet