juststeveking/stats-com-sdk-php

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A wrapper library for the stats.com API

1.0.1 2019-08-19 08:34 UTC

This package is auto-updated.

Last update: 2021-06-19 13:09:00 UTC


README

Build Status

About

The stats-com-sdk-php package is an SDK wrapper for the stats.com API.

Installation

Require the juststeveking/stats-com-sdk-php package in your composer.json and update your dependencies:

composer require juststeveking/stats-com-sdk-php

Instantiating the Client:

Pass in the configuration to the client:

use JustSteveKing\Stats\Client;

$config = [
    'base' => '{the_base_url}', // optional
    'username' => '{your_username}',
    'password' => '{your_password}'
];

$client = new Client($config);

Or configure after construct:

use JustSteveKing\Stats\Client;
$client = new Client()
            ->setBase('https://example.com/api') // optional
            ->setUsername('username')
            ->setPassword('password');

GET a resource

Fetch a Resource by ID:

$client->resource->get($id);

Testing

./vendor/bin/phpunit