songkickr 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +2 -0
  3. data/.gitignore +1 -0
  4. data/.travis.yml +8 -0
  5. data/Gemfile.lock +42 -22
  6. data/LICENSE +1 -1
  7. data/README.rdoc +14 -9
  8. data/Rakefile +3 -4
  9. data/lib/songkickr/artist.rb +2 -2
  10. data/lib/songkickr/artist_result.rb +4 -24
  11. data/lib/songkickr/calendar_entry.rb +23 -0
  12. data/lib/songkickr/calendar_result.rb +10 -0
  13. data/lib/songkickr/concert_setlist_result.rb +5 -27
  14. data/lib/songkickr/event.rb +8 -14
  15. data/lib/songkickr/event_result.rb +5 -23
  16. data/lib/songkickr/location.rb +4 -4
  17. data/lib/songkickr/location_result.rb +5 -30
  18. data/lib/songkickr/metro_area.rb +28 -0
  19. data/lib/songkickr/metro_area_result.rb +12 -0
  20. data/lib/songkickr/performance.rb +17 -12
  21. data/lib/songkickr/remote.rb +18 -198
  22. data/lib/songkickr/remote_api/artist_details.rb +17 -0
  23. data/lib/songkickr/remote_api/event_details.rb +17 -0
  24. data/lib/songkickr/remote_api/past_events.rb +48 -0
  25. data/lib/songkickr/remote_api/similar_artists.rb +14 -0
  26. data/lib/songkickr/remote_api/upcoming_events.rb +125 -0
  27. data/lib/songkickr/remote_api/user_events_and_trackings.rb +143 -0
  28. data/lib/songkickr/remote_api/venue_details.rb +16 -0
  29. data/lib/songkickr/result_set.rb +27 -0
  30. data/lib/songkickr/setlist.rb +7 -12
  31. data/lib/songkickr/setlist_item.rb +1 -1
  32. data/lib/songkickr/tracking.rb +18 -0
  33. data/lib/songkickr/tracking_result.rb +24 -0
  34. data/lib/songkickr/venue.rb +10 -2
  35. data/lib/songkickr/venue_result.rb +32 -0
  36. data/lib/songkickr/version.rb +1 -1
  37. data/lib/songkickr.rb +24 -17
  38. data/songkickr.gemspec +17 -44
  39. data/test/fixtures/event_7391451.json +732 -1
  40. data/test/fixtures/location_search.json +38 -0
  41. data/test/fixtures/metro_area.json +11 -0
  42. data/test/fixtures/users_attendance_calendar.json +243 -0
  43. data/test/fixtures/vcr/artist_events.yml +1394 -0
  44. data/test/fixtures/vcr/artist_search.yml +38 -0
  45. data/test/fixtures/vcr/artists_gigography.yml +187 -0
  46. data/test/fixtures/vcr/concert_setlists.yml +47 -0
  47. data/test/fixtures/vcr/event_search.yml +110 -0
  48. data/test/fixtures/vcr/invalid_api_key.yml +6 -36
  49. data/test/fixtures/vcr/invalid_artist_id.yml +6 -6
  50. data/test/fixtures/vcr/invalid_event_id.yml +6 -6
  51. data/test/fixtures/vcr/invalid_user.yml +6 -6
  52. data/test/fixtures/vcr/invalid_venue_id.yml +6 -6
  53. data/test/fixtures/vcr/location_search.yml +42 -0
  54. data/test/fixtures/vcr/metro_areas_events.yml +1535 -0
  55. data/test/fixtures/vcr/similar_artists.yml +64 -0
  56. data/test/fixtures/vcr/users_artist_tracking.yml +99 -0
  57. data/test/fixtures/vcr/users_attendance.yml +66 -0
  58. data/test/fixtures/vcr/users_attendance_calendar.yml +51 -0
  59. data/test/fixtures/vcr/users_events.yml +809 -0
  60. data/test/fixtures/vcr/users_gigography.yml +2782 -0
  61. data/test/fixtures/vcr/users_metro_area_tracking.yml +66 -0
  62. data/test/fixtures/vcr/users_muted_artists.yml +66 -0
  63. data/test/fixtures/vcr/users_tracked_artists.yml +75 -0
  64. data/test/fixtures/vcr/users_tracked_events_calendar.yml +1901 -0
  65. data/test/fixtures/vcr/users_tracked_metro_areas.yml +37 -0
  66. data/test/fixtures/vcr/valid_artist.yml +9 -9
  67. data/test/fixtures/vcr/valid_event.yml +103 -38
  68. data/test/fixtures/vcr/valid_user.yml +634 -44
  69. data/test/fixtures/vcr/valid_venue.yml +25 -26
  70. data/test/fixtures/vcr/venue_calendar.yml +500 -0
  71. data/test/fixtures/vcr/venue_search.yml +42 -0
  72. data/test/helper.rb +1 -27
  73. data/test/songkickr/test_calendar_entry.rb +15 -0
  74. data/test/songkickr/test_event.rb +8 -9
  75. data/test/songkickr/test_location.rb +11 -11
  76. data/test/songkickr/test_metro_area.rb +17 -0
  77. data/test/songkickr/test_remote.rb +149 -3
  78. data/test/songkickr/test_setlist_item.rb +20 -0
  79. data/test/songkickr/test_venue.rb +1 -2
  80. data/test.rb +3 -5
  81. metadata +120 -152
  82. data/bin/autospec +0 -16
  83. data/bin/convert_to_should_syntax +0 -16
  84. data/bin/guard +0 -16
  85. data/bin/htmldiff +0 -16
  86. data/bin/httparty +0 -16
  87. data/bin/jeweler +0 -16
  88. data/bin/ldiff +0 -16
  89. data/bin/rake +0 -16
  90. data/bin/rake2thor +0 -16
  91. data/bin/rg +0 -16
  92. data/bin/ri +0 -16
  93. data/bin/rspec +0 -16
  94. data/bin/thor +0 -16
  95. data/doc/APIError.html +0 -241
  96. data/doc/APIKeyNotSet.html +0 -203
  97. data/doc/LICENSE.html +0 -133
  98. data/doc/README_rdoc.html +0 -173
  99. data/doc/ResourceNotFound.html +0 -203
  100. data/doc/Songkickr/Artist.html +0 -278
  101. data/doc/Songkickr/ArtistResult.html +0 -308
  102. data/doc/Songkickr/ConcertSetlistResult.html +0 -283
  103. data/doc/Songkickr/Event.html +0 -491
  104. data/doc/Songkickr/EventResult.html +0 -306
  105. data/doc/Songkickr/Location.html +0 -299
  106. data/doc/Songkickr/LocationResult.html +0 -309
  107. data/doc/Songkickr/Performance.html +0 -295
  108. data/doc/Songkickr/Remote.html +0 -864
  109. data/doc/Songkickr/Setlist.html +0 -360
  110. data/doc/Songkickr/SetlistItem.html +0 -244
  111. data/doc/Songkickr/Venue.html +0 -265
  112. data/doc/Songkickr.html +0 -261
  113. data/doc/created.rid +0 -16
  114. data/doc/images/add.png +0 -0
  115. data/doc/images/brick.png +0 -0
  116. data/doc/images/brick_link.png +0 -0
  117. data/doc/images/bug.png +0 -0
  118. data/doc/images/bullet_black.png +0 -0
  119. data/doc/images/bullet_toggle_minus.png +0 -0
  120. data/doc/images/bullet_toggle_plus.png +0 -0
  121. data/doc/images/date.png +0 -0
  122. data/doc/images/delete.png +0 -0
  123. data/doc/images/find.png +0 -0
  124. data/doc/images/loadingAnimation.gif +0 -0
  125. data/doc/images/macFFBgHack.png +0 -0
  126. data/doc/images/package.png +0 -0
  127. data/doc/images/page_green.png +0 -0
  128. data/doc/images/page_white_text.png +0 -0
  129. data/doc/images/page_white_width.png +0 -0
  130. data/doc/images/plugin.png +0 -0
  131. data/doc/images/ruby.png +0 -0
  132. data/doc/images/tag_blue.png +0 -0
  133. data/doc/images/tag_green.png +0 -0
  134. data/doc/images/transparent.png +0 -0
  135. data/doc/images/wrench.png +0 -0
  136. data/doc/images/wrench_orange.png +0 -0
  137. data/doc/images/zoom.png +0 -0
  138. data/doc/index.html +0 -110
  139. data/doc/js/darkfish.js +0 -153
  140. data/doc/js/jquery.js +0 -18
  141. data/doc/js/navigation.js +0 -142
  142. data/doc/js/quicksearch.js +0 -114
  143. data/doc/js/search.js +0 -94
  144. data/doc/js/search_index.js +0 -1
  145. data/doc/js/searcher.js +0 -228
  146. data/doc/js/thickbox-compressed.js +0 -10
  147. data/doc/lib/songkickr/artist_rb.html +0 -52
  148. data/doc/lib/songkickr/artist_result_rb.html +0 -52
  149. data/doc/lib/songkickr/concert_setlist_result_rb.html +0 -52
  150. data/doc/lib/songkickr/event_rb.html +0 -52
  151. data/doc/lib/songkickr/event_result_rb.html +0 -52
  152. data/doc/lib/songkickr/location_rb.html +0 -52
  153. data/doc/lib/songkickr/location_result_rb.html +0 -52
  154. data/doc/lib/songkickr/performance_rb.html +0 -52
  155. data/doc/lib/songkickr/remote_rb.html +0 -52
  156. data/doc/lib/songkickr/setlist_item_rb.html +0 -52
  157. data/doc/lib/songkickr/setlist_rb.html +0 -52
  158. data/doc/lib/songkickr/venue_rb.html +0 -52
  159. data/doc/lib/songkickr_rb.html +0 -56
  160. data/doc/rdoc.css +0 -543
  161. data/doc/table_of_contents.html +0 -185
  162. data/test/fixtures/locations_bar.json +0 -1
@@ -0,0 +1,38 @@
1
+ {
2
+ "resultsPage": {
3
+ "status": "ok",
4
+ "results": {
5
+ "location": [
6
+ {
7
+ "city": {
8
+ "lat": 44.9801,
9
+ "lng": -93.2519,
10
+ "country": {
11
+ "displayName": "US"
12
+ },
13
+ "state": {
14
+ "displayName": "MN"
15
+ },
16
+ "displayName": "Twin Cities"
17
+ },
18
+ "metroArea": {
19
+ "lat": 44.9801,
20
+ "lng": -93.2519,
21
+ "country": {
22
+ "displayName": "US"
23
+ },
24
+ "uri": "http://www.songkick.com/metro_areas/35130-us-twin-cities?utm_source=4791&utm_medium=partner",
25
+ "state": {
26
+ "displayName": "MN"
27
+ },
28
+ "displayName": "Twin Cities",
29
+ "id": 35130
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ "perPage": 50,
35
+ "page": 1,
36
+ "totalEntries": 1
37
+ }
38
+ }
@@ -0,0 +1,11 @@
1
+ "metroArea": {
2
+ "displayName": "Twin Cities",
3
+ "uri": "http://www.songkick.com/metro_areas/35130-us-twin-cities?utm_source=4791&utm_medium=partner",
4
+ "id": 35130,
5
+ "state": {
6
+ "displayName": "MN"
7
+ },
8
+ "country": {
9
+ "displayName": "US"
10
+ }
11
+ }
@@ -0,0 +1,243 @@
1
+ {
2
+ "resultsPage": {
3
+ "status": "ok",
4
+ "results": {
5
+ "calendarEntry": [
6
+ {
7
+ "reason": {
8
+ "attendance": "i_might_go"
9
+ },
10
+ "event": {
11
+ "type": "Concert",
12
+ "status": "ok",
13
+ "displayName": "Oceano with Reflections, Sworn In, and Adestria at The Garage (August 19, 2013)",
14
+ "popularity": 0,
15
+ "start": {
16
+ "time": "17:30:00",
17
+ "date": "2013-08-19",
18
+ "datetime": "2013-08-19T17:30:00-0600"
19
+ },
20
+ "location": {
21
+ "city": "Burnsville, MN, US",
22
+ "lat": 44.7657691,
23
+ "lng": -93.2743603
24
+ },
25
+ "uri": "http://www.songkick.com/concerts/17472154-oceano-at-garage?utm_source=4791&utm_medium=partner",
26
+ "id": 17472154,
27
+ "performance": [
28
+ {
29
+ "billingIndex": 1,
30
+ "billing": "headline",
31
+ "displayName": "Oceano",
32
+ "artist": {
33
+ "identifier": [
34
+ {
35
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:d2ad541b-55d1-48bf-bdf1-ef0c3d3518e2.json",
36
+ "mbid": "d2ad541b-55d1-48bf-bdf1-ef0c3d3518e2"
37
+ },
38
+ {
39
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:06c2da57-090e-46b8-a671-0e085618ab61.json",
40
+ "mbid": "06c2da57-090e-46b8-a671-0e085618ab61"
41
+ }
42
+ ],
43
+ "displayName": "Oceano",
44
+ "uri": "http://www.songkick.com/artists/2050016-oceano?utm_source=4791&utm_medium=partner",
45
+ "id": 2050016
46
+ },
47
+ "id": 34584889
48
+ },
49
+ {
50
+ "billingIndex": 2,
51
+ "billing": "support",
52
+ "displayName": "Reflections",
53
+ "artist": {
54
+ "identifier": [
55
+ {
56
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:c03e760f-c289-45c2-b5b3-d8cd2138f71c.json",
57
+ "mbid": "c03e760f-c289-45c2-b5b3-d8cd2138f71c"
58
+ },
59
+ {
60
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:b19805cd-83ba-43f0-894f-ccf858668eca.json",
61
+ "mbid": "b19805cd-83ba-43f0-894f-ccf858668eca"
62
+ },
63
+ {
64
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:8f6f6b87-4415-42d9-9da6-fb6b00a1bb7d.json",
65
+ "mbid": "8f6f6b87-4415-42d9-9da6-fb6b00a1bb7d"
66
+ }
67
+ ],
68
+ "displayName": "Reflections",
69
+ "uri": "http://www.songkick.com/artists/139272-reflections?utm_source=4791&utm_medium=partner",
70
+ "id": 139272
71
+ },
72
+ "id": 34584894
73
+ },
74
+ {
75
+ "billingIndex": 3,
76
+ "billing": "support",
77
+ "displayName": "Sworn In",
78
+ "artist": {
79
+ "identifier": [
80
+ {
81
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:02d1a7e3-abd8-4908-bbff-e53da5881407.json",
82
+ "mbid": "02d1a7e3-abd8-4908-bbff-e53da5881407"
83
+ }
84
+ ],
85
+ "displayName": "Sworn In",
86
+ "uri": "http://www.songkick.com/artists/434303-sworn-in?utm_source=4791&utm_medium=partner",
87
+ "id": 434303
88
+ },
89
+ "id": 34584899
90
+ },
91
+ {
92
+ "billingIndex": 4,
93
+ "billing": "support",
94
+ "displayName": "Adestria",
95
+ "artist": {
96
+ "identifier": [
97
+ {
98
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:d142cc73-95da-4cb2-b59b-a5958a4b84bd.json",
99
+ "mbid": "d142cc73-95da-4cb2-b59b-a5958a4b84bd"
100
+ }
101
+ ],
102
+ "displayName": "Adestria",
103
+ "uri": "http://www.songkick.com/artists/3453296-adestria?utm_source=4791&utm_medium=partner",
104
+ "id": 3453296
105
+ },
106
+ "id": 34584904
107
+ }
108
+ ],
109
+ "venue": {
110
+ "displayName": "The Garage",
111
+ "metroArea": {
112
+ "displayName": "Twin Cities",
113
+ "uri": "http://www.songkick.com/metro_areas/35130-us-twin-cities?utm_source=4791&utm_medium=partner",
114
+ "id": 35130,
115
+ "state": {
116
+ "displayName": "MN"
117
+ },
118
+ "country": {
119
+ "displayName": "US"
120
+ }
121
+ },
122
+ "lat": 44.7657691,
123
+ "lng": -93.2743603,
124
+ "uri": "http://www.songkick.com/venues/68388-garage?utm_source=4791&utm_medium=partner",
125
+ "id": 68388
126
+ }
127
+ },
128
+ "createdAt": "2013-07-28T07:08:44+0100"
129
+ },
130
+ {
131
+ "reason": {
132
+ "attendance": "i_might_go"
133
+ },
134
+ "event": {
135
+ "type": "Concert",
136
+ "status": "ok",
137
+ "performance": [
138
+ {
139
+ "artist": {
140
+ "identifier": [
141
+ {
142
+ "mbid": "b4946461-dacb-4aa9-a77c-7b3231317794",
143
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:b4946461-dacb-4aa9-a77c-7b3231317794.json"
144
+ }
145
+ ],
146
+ "displayName": "Senses Fail",
147
+ "uri": "http://www.songkick.com/artists/109675-senses-fail?utm_source=4791&utm_medium=partner",
148
+ "id": 109675
149
+ },
150
+ "billingIndex": 1,
151
+ "billing": "headline",
152
+ "displayName": "Senses Fail",
153
+ "id": 34361339
154
+ },
155
+ {
156
+ "artist": {
157
+ "identifier": [
158
+ {
159
+ "mbid": "498e46e2-59c9-4320-8ccf-12c67a29b125",
160
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:498e46e2-59c9-4320-8ccf-12c67a29b125.json"
161
+ }
162
+ ],
163
+ "displayName": "Expire",
164
+ "uri": "http://www.songkick.com/artists/1300477-expire?utm_source=4791&utm_medium=partner",
165
+ "id": 1300477
166
+ },
167
+ "billingIndex": 2,
168
+ "billing": "headline",
169
+ "displayName": "Expire",
170
+ "id": 34361349
171
+ },
172
+ {
173
+ "artist": {
174
+ "identifier": [
175
+ {
176
+ "mbid": "6fca6647-1dce-4028-8348-68238b8d2237",
177
+ "href": "http://api.songkick.com/api/3.0/artists/mbid:6fca6647-1dce-4028-8348-68238b8d2237.json"
178
+ }
179
+ ],
180
+ "displayName": "For the Fallen Dreams",
181
+ "uri": "http://www.songkick.com/artists/1791519-for-the-fallen-dreams?utm_source=4791&utm_medium=partner",
182
+ "id": 1791519
183
+ },
184
+ "billingIndex": 3,
185
+ "billing": "support",
186
+ "displayName": "For the Fallen Dreams",
187
+ "id": 34361344
188
+ },
189
+ {
190
+ "artist": {
191
+ "identifier": [],
192
+ "displayName": "Being As an Ocean",
193
+ "uri": "http://www.songkick.com/artists/5131333-being-as-an-ocean?utm_source=4791&utm_medium=partner",
194
+ "id": 5131333
195
+ },
196
+ "billingIndex": 4,
197
+ "billing": "support",
198
+ "displayName": "Being As an Ocean",
199
+ "id": 34361354
200
+ }
201
+ ],
202
+ "venue": {
203
+ "lng": -93.2743603,
204
+ "metroArea": {
205
+ "displayName": "Twin Cities",
206
+ "uri": "http://www.songkick.com/metro_areas/35130-us-twin-cities?utm_source=4791&utm_medium=partner",
207
+ "id": 35130,
208
+ "state": {
209
+ "displayName": "MN"
210
+ },
211
+ "country": {
212
+ "displayName": "US"
213
+ }
214
+ },
215
+ "displayName": "The Garage",
216
+ "uri": "http://www.songkick.com/venues/68388-garage?utm_source=4791&utm_medium=partner",
217
+ "id": 68388,
218
+ "lat": 44.7657691
219
+ },
220
+ "start": {
221
+ "time": "17:00:00",
222
+ "date": "2013-10-11",
223
+ "datetime": "2013-10-11T17:00:00-0600"
224
+ },
225
+ "location": {
226
+ "lng": -93.2743603,
227
+ "city": "Burnsville, MN, US",
228
+ "lat": 44.7657691
229
+ },
230
+ "displayName": "Senses Fail and Expire with For the Fallen Dreams and Being As an Ocean at The Garage (October 11, 2013)",
231
+ "uri": "http://www.songkick.com/concerts/17361884-senses-fail-at-garage?utm_source=4791&utm_medium=partner",
232
+ "popularity": 0,
233
+ "id": 17361884
234
+ },
235
+ "createdAt": "2013-07-21T02:51:32+0100"
236
+ }
237
+ ]
238
+ },
239
+ "perPage": 50,
240
+ "page": 1,
241
+ "totalEntries": 2
242
+ }
243
+ }