aucklandia 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +2 -2
- data/lib/aucklandia/routes.rb +8 -0
- data/lib/aucklandia/stops.rb +8 -0
- data/lib/aucklandia/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b27dfd48680826ba8eb65ada26a623726a8abf61
|
4
|
+
data.tar.gz: bb2352ac60e378c2e63f52ce7ad55248453a71f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3834ffa6e38b741cb7c091437e9ea077dc32b9caf4491e7934722c060c6d6575382ea842da679bfdc960691a0163ec11f3658cebc90b25b8dd03b2613faa95a
|
7
|
+
data.tar.gz: d759b3f0ee6774d6e211624edcf6723fe39729e72156d4109afea77247823686212a792841cb6f23ab8c74321a665ecdc1e99bf38403ffa209175be7105b018c
|
data/Gemfile.lock
CHANGED
data/lib/aucklandia/routes.rb
CHANGED
@@ -17,5 +17,13 @@ module Aucklandia
|
|
17
17
|
|
18
18
|
JSON.parse(response)['response']
|
19
19
|
end
|
20
|
+
|
21
|
+
def get_route_by_id(route_id)
|
22
|
+
url = build_url(BASE_URL, ROUTE_ENDPOINT, '/routeId/', route_id)
|
23
|
+
|
24
|
+
response = get(url)
|
25
|
+
|
26
|
+
JSON.parse(response)['response'].first
|
27
|
+
end
|
20
28
|
end
|
21
29
|
end
|
data/lib/aucklandia/stops.rb
CHANGED
@@ -2,6 +2,14 @@ module Aucklandia
|
|
2
2
|
module Stops
|
3
3
|
STOPS_ENDPOINT = '/gtfs/stops'
|
4
4
|
|
5
|
+
def get_stops
|
6
|
+
url = build_url(BASE_URL, STOPS_ENDPOINT)
|
7
|
+
|
8
|
+
response = get(url)
|
9
|
+
|
10
|
+
JSON.parse(response)['response']
|
11
|
+
end
|
12
|
+
|
5
13
|
def get_stops_by_trip_id(trip_id)
|
6
14
|
url = build_url(BASE_URL, STOPS_ENDPOINT, '/tripId/', trip_id)
|
7
15
|
|
data/lib/aucklandia/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aucklandia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theo Markkus Paul
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
181
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.
|
182
|
+
rubygems_version: 2.4.5.1
|
183
183
|
signing_key:
|
184
184
|
specification_version: 4
|
185
185
|
summary: Auckland Transport API wrapper gem. Provides a suite of easy-to-use methods
|