ticketmaster-sdk 0.0.05 → 0.0.06

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b132fc7590e86bf96db69f5ad10f3f5fdbf7dbb
4
- data.tar.gz: 415795677aa2168e82338df1e4af1b827fa358d7
3
+ metadata.gz: d2291e52ae82b8a984e96d299e02122989a938de
4
+ data.tar.gz: f878b8a04574620ed79a10251cf4fab51318e054
5
5
  SHA512:
6
- metadata.gz: c5d01dde83d70e6b2c6594a0808068610c611eff406e82a45230c12758c9b34533894de75096ed2e06eab0f01bc3c7d02777f7616bb2ce6d87fe9d64862e1f80
7
- data.tar.gz: 6eac5d2e51825995a88f04707e7a95a7612cce27a76532d9b1c071a5a47ca7a30160243c55dd3cf640f297b03434afd3620b100b4c74c78f990b653d696dfef2
6
+ metadata.gz: 200d2294bf2aa25a1d4bdb758a46b0743b7da3bcd8ff698cee76404e2b301abb2e7c7d35bc8bcb55f9a7a8507c78dd1d0d6bbe8d9bf1fdbdf7226d93b96c34cd
7
+ data.tar.gz: 9cb1dbff9b6020f3d9ea3595e9dfbc0e9ec1ed0d4182cba6a8ff45ff9b3aa11ed2d6942a9c495b074203c4316de8420a4cacbcfa7b18b190b8ced8a4316724d7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ticketmaster-sdk (0.0.04)
4
+ ticketmaster-sdk (0.0.05)
5
5
  faraday
6
6
  json
7
7
 
@@ -3,6 +3,8 @@ module Ticketmaster
3
3
  attr_accessor :type
4
4
 
5
5
  def results
6
+ return [] if data['_embedded'].nil?
7
+
6
8
  data['_embedded'][type].map do |event|
7
9
  Result.create(event, request, "Ticketmaster::#{type.capitalize.chop}")
8
10
  end
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://app.ticketmaster.com/discovery/v2/venues?apikey=TEST&format=json&keyword=INVALIDSEARCHINPUT
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Access-Control-Allow-Headers:
22
+ - origin, x-requested-with, accept
23
+ Access-Control-Allow-Methods:
24
+ - GET, PUT, POST, DELETE
25
+ Access-Control-Allow-Origin:
26
+ - "*"
27
+ Access-Control-Max-Age:
28
+ - '3628800'
29
+ Content-Type:
30
+ - application/hal+json;charset=utf-8
31
+ Date:
32
+ - Wed, 15 Jun 2016 14:54:36 GMT
33
+ Rate-Limit:
34
+ - '500000'
35
+ Rate-Limit-Available:
36
+ - '499973'
37
+ Rate-Limit-Over:
38
+ - '0'
39
+ Rate-Limit-Reset:
40
+ - '1466057554290'
41
+ Server:
42
+ - Apache-Coyote/1.1
43
+ Set-Cookie:
44
+ - CMPS=yftBuRKqgoSfziL1ph4D0MuT/2NrN8BPuIYL1l1jXggkmXwY5j38faYiUwCRt0KpTiltpL+n6lI=;
45
+ path=/
46
+ Vary:
47
+ - Accept-Encoding
48
+ X-Application-Context:
49
+ - application:local,default,jphx1:8080
50
+ X-Unknown-Params:
51
+ - format
52
+ Content-Length:
53
+ - '12118'
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"_links":{"self":{"href":"/discovery/v2/venues?countryCode=US&keyword=INVALIDSEARCHINPUT"}},"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}'
59
+ http_version:
60
+ recorded_at: Wed, 15 Jun 2016 14:54:38 GMT
61
+ recorded_with: VCR 3.0.3
@@ -92,4 +92,13 @@ class ClientTest < Minitest::Test
92
92
  end
93
93
  end
94
94
 
95
+ def test_search_venues_blank
96
+ VCR.use_cassette('search_blank') do
97
+ client = Ticketmaster::Client.new(apikey: 'TEST')
98
+ results = client.search_venues({params: {keyword: 'INVALIDSEARCHINPUT'}}).results
99
+
100
+ assert_equal 0, results.length
101
+ end
102
+ end
103
+
95
104
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.05
4
+ version: 0.0.06
5
5
  platform: ruby
6
6
  authors:
7
7
  - Conner Fritz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-29 00:00:00.000000000 Z
11
+ date: 2019-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -136,6 +136,7 @@ files:
136
136
  - test/fixtures/get_event_images.yml
137
137
  - test/fixtures/get_venue.yml
138
138
  - test/fixtures/search_attractions.yml
139
+ - test/fixtures/search_blank.yml
139
140
  - test/fixtures/search_classifications.yml
140
141
  - test/fixtures/search_events.yml
141
142
  - test/fixtures/search_venues.yml