citybikes_api 0.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/citybikes_api.rb +8 -0
- data/lib/citybikes_api/version.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 023d6a354f3510731f6961806f642958fc59f1f3
|
4
|
+
data.tar.gz: 6baef3ed49ad9f16f5aa259f94523e96665ee9e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e6236c38e3405de262769be0767eb49fa240133a38d2f3a5e746026fc552e308e48c87ec4fd08c28df3006f79dccf7ca605e03e3d9b94d63a5a5d6e9ee1197b
|
7
|
+
data.tar.gz: 3670331f6e7c82ff4fe3b4986450069d97b9fbacdb41f125d23806a48e42cf6864615015c0f32139288d51cfd92a8295f92878e1ca5816ca77bb9472e91b80ab
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# CitybikesApi - Ruby
|
2
2
|
|
3
|
-
A ruby interface to the [CityBikes API](http://api.citybik.es/v2/) (v2).
|
3
|
+
A ruby interface to the [CityBikes API](http://api.citybik.es/v2/) (v2).
|
4
|
+
Includes endpoints for bike-share network and station data.
|
5
|
+
|
6
|
+
[](https://badge.fury.io/rb/citybikes_api)
|
4
7
|
|
5
8
|
## Installation
|
6
9
|
|
data/lib/citybikes_api.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
require "citybikes_api/version"
|
2
2
|
require "httparty"
|
3
3
|
|
4
|
+
# A collection of methods to facilitate citybikes api requests.
|
4
5
|
module CitybikesApi
|
6
|
+
# The base url for all endpoint requests.
|
5
7
|
BASE_URL = "http://api.citybik.es/v2"
|
6
8
|
|
7
9
|
# Networks Endpoint
|
@@ -12,6 +14,12 @@ module CitybikesApi
|
|
12
14
|
response = HTTParty.get("#{BASE_URL}/networks")
|
13
15
|
end
|
14
16
|
|
17
|
+
# Network Endpoint
|
18
|
+
#
|
19
|
+
# @param [String] network_id The unique bike-share network identifier assigned by citybikes.
|
20
|
+
#
|
21
|
+
# @example CityBikesApi.network("capital-bikeshare")
|
22
|
+
#
|
15
23
|
def self.network(network_id)
|
16
24
|
response = HTTParty.get("#{BASE_URL}/networks/#{network_id}")
|
17
25
|
end
|