PHPackages                             focus-sports-labs/fsl-data-center - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. focus-sports-labs/fsl-data-center

Abandoned → [velocity-sports-labs/datacenter-php-sdk](/?search=velocity-sports-labs%2Fdatacenter-php-sdk)Library[API Development](/categories/api)

focus-sports-labs/fsl-data-center
=================================

PHP SDK for Velocity Sports Labs Data Center APIs

v1.5.3(1mo ago)02.5k[1 PRs](https://github.com/velocitysportslabs/datacenter-php-sdk/pulls)1MITPHPPHP ^8.2CI passing

Since Dec 29Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/velocitysportslabs/datacenter-php-sdk)[ Packagist](https://packagist.org/packages/focus-sports-labs/fsl-data-center)[ RSS](/packages/focus-sports-labs-fsl-data-center/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (42)Versions (28)Used By (1)

VSL Data Center PHP SDK
=======================

[](#vsl-data-center-php-sdk)

A simple PHP SDK for [VSL's Data Center API](https://velocitysportslabs.com/).

Using this sdk you can easily communicate with VSL's Data Center API

Here are a few examples of the provided methods:

```
use VelocitySportsLabs\DataCenter\Client;
use VelocitySportsLabs\DataCenter\HttpClient\Options;

// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';

$options = new Options([
    'auth_token' => 'token', // get this from your application profile
    'origin' => 'http://localhost', // you set this when creating your application
]);

$client = new Client($options);
$response = $client->countries()->list();

// this would give you a list of all countries supported by VSL
dump($response);
```

Requirements
------------

[](#requirements)

To use this project you need:

- PHP 8.1 and above
- A [PSR-17 implementation](https://packagist.org/providers/psr/http-factory-implementation)
- A [PSR-18 implementation](https://packagist.org/providers/psr/http-client-implementation)

Installation
------------

[](#installation)

You can install the package via composer by running:

```
composer require velocity-sports-labs/datacenter-php-sdk
```

How to obtain api keys
----------------------

[](#how-to-obtain-api-keys)

The first thing you will need to do is create or login to your account at [VSL's Data Center API](https://velocitysportslabs.com/)

![Image of login page]()

![Image of registration page]()

Next up is create an application to get the api keys and origin

![Image of create application page]()

Make sure to copy your api keys as you will need it when setting up the client.

Usage
-----

[](#usage)

First instantiate the client

```
use VelocitySportsLabs\DataCenter\Client;
use VelocitySportsLabs\DataCenter\HttpClient\Options;

// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';

$options = new Options([
    'auth_token' => 'token', // get this from your application profile
    'origin' => 'http://localhost', // you set this when creating your application
]);

$client = new Client($options);
```

Now that you have the client you can access all available endpoints. Like shown below

```
