Skip to content

PHP Library to talk to British Swimming Rankings Database

License

Notifications You must be signed in to change notification settings

SwimSuite/rankings-db-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rankings DB

Rankings DB is a PHP library to provide a clean interface to interact with the British Swimming rankings database.

Install

Via Composer:

$ composer require huwcbjones/rankings-db *

Basic Usage

<?php

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

$client = new \RankingsDB\RankingsClient($personal_key, $personal_key_id_number);

From a $client object, you can fetch member details and times.

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

$client = new \RankingsDB\RankingsClient($personal_key, $personal_key_id_number);

// Get a member's details
$member = $client->getMemberDetails($member_id);

// Get their all time PBs
$options = new GetTimesBuilder($member->MemberID());
$times = $client->getTimes($options);

// Get their times from the past year
$options->setFromDate((new DateTime())->sub(new DateInterval("P1Y")));

$times = $client->getTimes($options);

Documentation

See the doc directory for more detailed documentation.

License

rankings-db-php is licensed under the MIT License - see the LICENSE file for details

About

PHP Library to talk to British Swimming Rankings Database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages