huwcbjones / rankings-db
Library to interact with British Swimming rankings database
Installs: 1 026
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.5
- ext-soap: *
Requires (Dev)
This package is auto-updated.
Last update: 2025-04-15 04:43:53 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