seat_geek 0.10.3 → 0.10.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/lib/seat_geek/build_query.rb +11 -3
- data/lib/seat_geek/version.rb +1 -1
- 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: 5d079c8285f6c2bea945a0016c9b4a9c71fd5dbc
|
4
|
+
data.tar.gz: 7a4e4413f7dd48fe2e21b87dedc3c84b0c334fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 072405cb06dadfc68cb9bd7f4fb499e337fb9fdde3fa7dffe2455cf4a0ad8868e8926a0371f61fa89b0ed1b1c00762aab13e842f79366e74412f0749973d4253
|
7
|
+
data.tar.gz: dc5d18e8bd9f920dea17030ee4238f0ff2433675c311a28650634657ed08394bcf2adbedcbb32979f5453b84f4b18c139aad26c4bc4efec38baf04306c99ee9f
|
@@ -9,7 +9,10 @@ module SeatGeek
|
|
9
9
|
query = query + travel_dates_query(options[:travel_dates])
|
10
10
|
end
|
11
11
|
if options[:state]
|
12
|
-
query = query + location_query(options[:state])
|
12
|
+
query = query + location_query(state: options[:state])
|
13
|
+
end
|
14
|
+
if options[:city]
|
15
|
+
query = query + location_query(city: options[:city])
|
13
16
|
end
|
14
17
|
if options[:attendee_count]
|
15
18
|
query = query + attendee_count_query(options[:attendee_count])
|
@@ -33,8 +36,13 @@ module SeatGeek
|
|
33
36
|
|
34
37
|
# Events in NY state
|
35
38
|
# $ curl 'http://api.seatgeek.com/2/events?venue.state=NY'
|
36
|
-
|
37
|
-
|
39
|
+
# $ curl 'http://api.seatgeek.com/2/events?venue.city=new-york'
|
40
|
+
def self.location_query(state: nil, city: nil)
|
41
|
+
if state
|
42
|
+
"&venue.state=#{state}"
|
43
|
+
elsif city
|
44
|
+
"&venue.city=#{city}"
|
45
|
+
end
|
38
46
|
end
|
39
47
|
|
40
48
|
# GET http://api.seatgeek.com/2/events?listing_count.gt=0
|
data/lib/seat_geek/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seat_geek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Moon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|