Skip to content

DASH API client library for accessing DASH API resources.

Notifications You must be signed in to change notification settings

SportsIT/api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dash - API Client Library

Additional documentation to follow.

Installing Dash API Client

With Composer

The recommended way to install Dash API Client is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Dash API Client:

php composer.phar require sportsit/api-client

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

You can then later update Dash API Client using composer:

composer.phar update

Usage

Creation of a client can be done as shown below:

$config = new \Dash\Configuration($clientID, $clientSecret, $companyCode);
$client = new \Dash\Client($config);

The client is a simple wrapper around the Guzzle HTTP library and as such any Guzzle methods can be accessed on the client as well.

$response = $client->get($uri, $options);

Making calls to the Dash API requires that you have a valid access token so make sure you authenticate with the API before making any other calls. Once you have an access token, it will automatically be added to all subsequent calls.

$response = $client->authenticate()->get($uri, $options);

About

DASH API client library for accessing DASH API resources.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages