ztm_warszawa 0.1.3 → 0.1.4
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 +1 -1
- data/lib/ztm_warszawa/version.rb +1 -1
- data/lib/ztm_warszawa.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a09f75e478850781ed4613f9c2ea504f4e3d2c0
|
4
|
+
data.tar.gz: 336b877fd3ee308266e5daa33b1c0848664ffa38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24cbe504c66d951ab59668a24c14365151de7dce556d09f2e13829c15c3dbd04ef8f8f1af0e95f7dd226a175ee88bca8c2930c512a96462785ae0859f8df2ba3
|
7
|
+
data.tar.gz: ab14856d78bebbc7e1206863881388850faaba43b2fc5c4e4d84e371f819bfbd713d93f81580f7dfce1e6fd1f25699f28ee1906222b6eb58c91f68a7f3e504bc
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ Now, you can use the following methods:
|
|
46
46
|
|
47
47
|
- `get_bus_lines(bus_stop_id, bus_stop_no)`: Returns an array of bus lines (e.g. 527, 141...) that depart from a given bus stop.
|
48
48
|
|
49
|
-
- `get_line_departure_hours(bus_stop_id, bus_stop_no, bus_line)`: Returns the server response with all the hours of departure of a given bus line from a given bus stop.
|
49
|
+
- `get_line_departure_hours(bus_stop_id, bus_stop_no, bus_line)`: Returns the server response with all the hours of departure of a given bus line from a given bus stop. Night bus lines (e.g. N37, N85...) are not supported due to some server-side errors.
|
50
50
|
|
51
51
|
- `get_closest_departures(server_response, script_starting_time, bus_line, number_of_departures)`: Given the server's response from `get_line_departure_hours()`, finds a given number of closest departures. The result is an array of hashes with "bus_line" and "time" entries.
|
52
52
|
|
data/lib/ztm_warszawa/version.rb
CHANGED
data/lib/ztm_warszawa.rb
CHANGED
@@ -37,6 +37,7 @@ class ZtmWarszawa
|
|
37
37
|
|
38
38
|
# Returns the server response with all the hours of departure of a given bus line from a given bus stop.
|
39
39
|
def get_line_departure_hours(bus_stop_id, bus_stop_no, bus_line)
|
40
|
+
raise 'Night bus lines are not supported due to some server-side errors.' if bus_line.start_with? "N"
|
40
41
|
url = "https://api.um.warszawa.pl/api/action/dbtimetable_get?id=e923fa0e-d96c-43f9-ae6e-60518c9f3238&busstopId=#{bus_stop_id}&busstopNr=#{bus_stop_no}&line=#{bus_line}&apikey=#{@api_key}"
|
41
42
|
response = HTTParty.get(url).parsed_response["result"]
|
42
43
|
return response
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ztm_warszawa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Górni
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|