PHPackages                             kevintcoughlin/citibike - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kevintcoughlin/citibike

AbandonedArchivedLibrary

kevintcoughlin/citibike
=======================

PHP Client for Citibike's REST API

21PHP

Since Mar 26Pushed 12y agoCompare

[ Source](https://github.com/KevinTCoughlin/citibike.php)[ Packagist](https://packagist.org/packages/kevintcoughlin/citibike)[ RSS](/packages/kevintcoughlin-citibike/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/75736f867783950b6ac3d582501b778ac9306bf7fbb53368094f92dc84ac0490/68747470733a2f2f7472617669732d63692e6f72672f4b6576696e54436f7567686c696e2f6369746962696b652e7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/KevinTCoughlin/citibike.php)

Usage
-----

[](#usage)

Set up the Citibike client:

```
$client = new Citibike\Client();
```

Then do what you wish with the data:

```
echo "Getting Stations\n";
foreach ($client->getStations()->results as $station) {
    echo "ID: " . $station->id . "\n";
    echo "Label: " . $station->label . "\n";
    echo "Latitude: " . $station->latitude . "\n";
    echo "Longitude: " . $station->longitude . "\n";
    echo "Available Bikes: " . $station->availableBikes . "\n";
    echo "Available Docks: " . $station->availableDocks . "\n";
}
```

### Stations Method

[](#stations-method)

```
$client->getStations();
```

### Branches Method

[](#branches-method)

```
$client->getBranches();
```

### Helmets Method

[](#helmets-method)

```
$client->getHelmets();
```

Installation
------------

[](#installation)

Citibike.php is available via [composer](https://packagist.org/packages/kevintcoughlin/citibike). You can install it by adding Citibike.php as a project dependency in your `composer.json` file like so:

```
{
    "require": {
        "kevintcoughlin/citibike": "dev-master"
    }
}
```

Then simply run

```
$ php composer.phar install

```

to install the library. More documentation on using composer can be found [here](http://getcomposer.org/doc/01-basic-usage.md).

Dependencies
------------

[](#dependencies)

Citibike.php is available via [composer](https://packagist.org/packages/kevintcoughlin/citibike)

- Guzzle ~3.7

I suggest using composer to install Citibike.php. To install via composer you can just run:

```
php composer.phar install

```

More documentation for composer can be found at [getcomposer.org](http://getcomposer.org).

Testing
-------

[](#testing)

Citibike.php has full unit tests that can be run with PHPUnit using:

```
$ phpunit

```

Contributors
------------

[](#contributors)

This is my first PHP library so feel free to improve the code and issue a pull request. I'll list you both here and in `composer.json`. Thanks in advance!

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2014 Kevin Coughlin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/518b1fe0ec0cad22dbb0bc1d359c78f7039d03b736705fd03b7a9fb2249c8979?d=identicon)[KevinTCoughlin](/maintainers/KevinTCoughlin)

---

Top Contributors

[![KevinTCoughlin](https://avatars.githubusercontent.com/u/706967?v=4)](https://github.com/KevinTCoughlin "KevinTCoughlin (12 commits)")

### Embed Badge

![Health badge](/badges/kevintcoughlin-citibike/health.svg)

```
[![Health](https://phpackages.com/badges/kevintcoughlin-citibike/health.svg)](https://phpackages.com/packages/kevintcoughlin-citibike)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
