From 0d1518439380c0cec6e716faa99d50ad27bad3dd Mon Sep 17 00:00:00 2001 From: Huw Jones Date: Sun, 20 Oct 2019 15:01:45 +0100 Subject: [PATCH] Prepared for composer release --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++--- composer.json | 7 +++---- docs/index.md | 3 +++ 3 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 docs/index.md diff --git a/README.md b/README.md index 9908b8e..523ceac 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,51 @@ -Rankings DB -============ -PHP library to interact with British Swimming rankings database. \ No newline at end of file +# Rankings DB + +Rankings DB is a PHP library to provide a clean interface to interact with the British Swimming rankings database. + + +## Install +Via Composer: + +```bash +$ composer require huwcbjones/rankings-db * +``` + +## Basic Usage +```php +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](doc/) for more detailed documentation. + + +## License + +`rankings-db-php` is licensed under the MIT License - see the [LICENSE](LICENSE) file for details \ No newline at end of file diff --git a/composer.json b/composer.json index a0b9574..735e59b 100644 --- a/composer.json +++ b/composer.json @@ -1,17 +1,16 @@ { "name": "huwcbjones/rankings-db", "description": "Library to interact with British Swimming rankings database", - "version": "0.1.0-dev", "type": "library", - "homepage": "https://github.com/huwcbjones/rankings-db", + "homepage": "https://github.com/huwcbjones/rankings-db-php", + "keywords": ["british", "swimming", "rankings", "database", "members", "times"], "readme": "README.md", "license": "MIT", "authors": [ { "name": "Huw Jones", "email": "huw@huwcbjones.co.uk", - "homepage": "https://www.huwcbjones.co.uk", - "role": "Developer" + "homepage": "https://www.huwcbjones.co.uk" } ], "autoload": { diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..9dd9c6d --- /dev/null +++ b/docs/index.md @@ -0,0 +1,3 @@ +# Rankings DB Docs + +TBW (To Be Written) \ No newline at end of file