huwcbjones / rankings-db
Library to interact with British Swimming rankings database
v0.3.1
2020-06-14 17:56 UTC
Requires
- php: >=5.5
- ext-soap: *
Requires (Dev)
This package is auto-updated.
Last update: 2025-06-15 04:58:27 UTC
README
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