songkickr 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.rdoc +11 -4
- data/VERSION +1 -1
- data/doc/APIKeyNotSet.html +214 -0
- data/doc/LICENSE.html +133 -0
- data/doc/README_rdoc.html +170 -0
- data/doc/Songkickr/Artist.html +305 -0
- data/doc/Songkickr/ArtistResult.html +334 -0
- data/doc/Songkickr/ConcertSetlistResult.html +301 -0
- data/doc/Songkickr/Event.html +556 -0
- data/doc/Songkickr/EventResult.html +332 -0
- data/doc/Songkickr/Location.html +326 -0
- data/doc/Songkickr/LocationResult.html +335 -0
- data/doc/Songkickr/Performance.html +326 -0
- data/doc/Songkickr/Remote.html +715 -0
- data/doc/Songkickr/Setlist.html +398 -0
- data/doc/Songkickr/SetlistItem.html +263 -0
- data/doc/Songkickr/Venue.html +292 -0
- data/doc/Songkickr.html +328 -0
- data/doc/created.rid +16 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +144 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/songkickr/artist_rb.html +52 -0
- data/doc/lib/songkickr/artist_result_rb.html +52 -0
- data/doc/lib/songkickr/concert_setlist_result_rb.html +52 -0
- data/doc/lib/songkickr/event_rb.html +52 -0
- data/doc/lib/songkickr/event_result_rb.html +52 -0
- data/doc/lib/songkickr/location_rb.html +52 -0
- data/doc/lib/songkickr/location_result_rb.html +52 -0
- data/doc/lib/songkickr/performance_rb.html +52 -0
- data/doc/lib/songkickr/remote_rb.html +52 -0
- data/doc/lib/songkickr/setlist_item_rb.html +52 -0
- data/doc/lib/songkickr/setlist_rb.html +52 -0
- data/doc/lib/songkickr/venue_rb.html +52 -0
- data/doc/lib/songkickr_rb.html +56 -0
- data/doc/rdoc.css +759 -0
- data/lib/songkickr/artist.rb +17 -6
- data/lib/songkickr/artist_result.rb +25 -22
- data/lib/songkickr/concert_setlist_result.rb +6 -2
- data/lib/songkickr/event.rb +42 -3
- data/lib/songkickr/event_result.rb +3 -1
- data/lib/songkickr/location.rb +28 -3
- data/lib/songkickr/location_result.rb +8 -3
- data/lib/songkickr/performance.rb +20 -4
- data/lib/songkickr/remote.rb +102 -60
- data/lib/songkickr/setlist.rb +20 -0
- data/lib/songkickr/setlist_item.rb +6 -0
- data/lib/songkickr.rb +16 -3
- data/songkickr.gemspec +60 -12
- data/test.rb +12 -11
- metadata +66 -13
@@ -0,0 +1,715 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Songkickr::Remote</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body id="top" class="class">
|
19
|
+
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
23
|
+
<h3 class="section-header">
|
24
|
+
<a href="../index.html">Home</a>
|
25
|
+
<a href="../index.html#classes">Classes</a>
|
26
|
+
<a href="../index.html#methods">Methods</a>
|
27
|
+
</h3>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="../lib/songkickr/remote_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="lib/songkickr/remote.rb">lib/songkickr/remote.rb</a></li>
|
39
|
+
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="class-metadata">
|
48
|
+
|
49
|
+
<!-- Parent Class -->
|
50
|
+
<div id="parent-class-section" class="section">
|
51
|
+
<h3 class="section-header">Parent</h3>
|
52
|
+
|
53
|
+
<p class="link">Object</p>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Method Quickref -->
|
64
|
+
<div id="method-list-section" class="section">
|
65
|
+
<h3 class="section-header">Methods</h3>
|
66
|
+
<ul class="link-list">
|
67
|
+
|
68
|
+
<li><a href="#method-c-new">::new</a></li>
|
69
|
+
|
70
|
+
<li><a href="#method-i-artist_search">#artist_search</a></li>
|
71
|
+
|
72
|
+
<li><a href="#method-i-concert_setlists">#concert_setlists</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-event">#event</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-events">#events</a></li>
|
77
|
+
|
78
|
+
<li><a href="#method-i-gigography">#gigography</a></li>
|
79
|
+
|
80
|
+
<li><a href="#method-i-location_search">#location_search</a></li>
|
81
|
+
|
82
|
+
<li><a href="#method-i-metro_areas_events">#metro_areas_events</a></li>
|
83
|
+
|
84
|
+
<li><a href="#method-i-users_events">#users_events</a></li>
|
85
|
+
|
86
|
+
</ul>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
<!-- Included Modules -->
|
92
|
+
<div id="includes-section" class="section">
|
93
|
+
<h3 class="section-header">Included Modules</h3>
|
94
|
+
<ul class="link-list">
|
95
|
+
|
96
|
+
|
97
|
+
<li><span class="include">HTTParty</span></li>
|
98
|
+
|
99
|
+
|
100
|
+
</ul>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div id="project-metadata">
|
106
|
+
|
107
|
+
|
108
|
+
<div id="fileindex-section" class="section project-section">
|
109
|
+
<h3 class="section-header">Files</h3>
|
110
|
+
<ul>
|
111
|
+
|
112
|
+
<li class="file"><a href="../LICENSE.html">LICENSE</a></li>
|
113
|
+
|
114
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
115
|
+
|
116
|
+
</ul>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
<div id="classindex-section" class="section project-section">
|
121
|
+
<h3 class="section-header">Class/Module Index
|
122
|
+
<span class="search-toggle"><img src="../images/find.png"
|
123
|
+
height="16" width="16" alt="[+]"
|
124
|
+
title="show/hide quicksearch" /></span></h3>
|
125
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
126
|
+
<fieldset>
|
127
|
+
<legend>Quicksearch</legend>
|
128
|
+
<input type="text" name="quicksearch" value=""
|
129
|
+
class="quicksearch-field" />
|
130
|
+
</fieldset>
|
131
|
+
</form>
|
132
|
+
|
133
|
+
<ul class="link-list">
|
134
|
+
|
135
|
+
<li><a href="../Songkickr.html">Songkickr</a></li>
|
136
|
+
|
137
|
+
<li><a href="../Songkickr/Artist.html">Songkickr::Artist</a></li>
|
138
|
+
|
139
|
+
<li><a href="../Songkickr/ArtistResult.html">Songkickr::ArtistResult</a></li>
|
140
|
+
|
141
|
+
<li><a href="../Songkickr/ConcertSetlistResult.html">Songkickr::ConcertSetlistResult</a></li>
|
142
|
+
|
143
|
+
<li><a href="../Songkickr/Event.html">Songkickr::Event</a></li>
|
144
|
+
|
145
|
+
<li><a href="../Songkickr/EventResult.html">Songkickr::EventResult</a></li>
|
146
|
+
|
147
|
+
<li><a href="../Songkickr/Location.html">Songkickr::Location</a></li>
|
148
|
+
|
149
|
+
<li><a href="../Songkickr/LocationResult.html">Songkickr::LocationResult</a></li>
|
150
|
+
|
151
|
+
<li><a href="../Songkickr/Performance.html">Songkickr::Performance</a></li>
|
152
|
+
|
153
|
+
<li><a href="../Songkickr/Remote.html">Songkickr::Remote</a></li>
|
154
|
+
|
155
|
+
<li><a href="../Songkickr/Setlist.html">Songkickr::Setlist</a></li>
|
156
|
+
|
157
|
+
<li><a href="../Songkickr/SetlistItem.html">Songkickr::SetlistItem</a></li>
|
158
|
+
|
159
|
+
<li><a href="../Songkickr/Venue.html">Songkickr::Venue</a></li>
|
160
|
+
|
161
|
+
<li><a href="../APIKeyNotSet.html">APIKeyNotSet</a></li>
|
162
|
+
|
163
|
+
</ul>
|
164
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div id="documentation">
|
172
|
+
<h1 class="class">Songkickr::Remote</h1>
|
173
|
+
|
174
|
+
<div id="description" class="description">
|
175
|
+
|
176
|
+
<p>Create an instance of the remote class to interact with the Songkick API.</p>
|
177
|
+
|
178
|
+
</div><!-- description -->
|
179
|
+
|
180
|
+
|
181
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<!-- Attributes -->
|
190
|
+
<div id="attribute-method-details" class="method-section section">
|
191
|
+
<h3 class="section-header">Attributes</h3>
|
192
|
+
|
193
|
+
|
194
|
+
<div id="api_key-attribute-method" class="method-detail">
|
195
|
+
<a name="api_key"></a>
|
196
|
+
|
197
|
+
<div class="method-heading attribute-method-heading">
|
198
|
+
<span class="method-name">api_key</span><span
|
199
|
+
class="attribute-access-type">[R]</span>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
<div class="method-description">
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
</div>
|
207
|
+
</div>
|
208
|
+
|
209
|
+
</div><!-- attribute-method-details -->
|
210
|
+
|
211
|
+
|
212
|
+
<!-- Methods -->
|
213
|
+
|
214
|
+
<div id="public-instance-method-details" class="method-section section">
|
215
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
216
|
+
|
217
|
+
|
218
|
+
<div id="artist_search-method" class="method-detail ">
|
219
|
+
<a name="method-i-artist_search"></a>
|
220
|
+
|
221
|
+
|
222
|
+
<div class="method-heading">
|
223
|
+
<span class="method-name">artist_search</span><span
|
224
|
+
class="method-args">(query={})</span>
|
225
|
+
<span class="method-click-advice">click to toggle source</span>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
|
229
|
+
<div class="method-description">
|
230
|
+
|
231
|
+
<h4><a href="Artist.html">Artist</a> Search API</h4>
|
232
|
+
|
233
|
+
<p>Returns <a href="Artist.html">Artist</a> objects.</p>
|
234
|
+
|
235
|
+
<p><a
|
236
|
+
href="http://www.songkick.com/developer/artist-search">www.songkick.com/developer/artist-search</a></p>
|
237
|
+
|
238
|
+
<h3>Parameters</h3>
|
239
|
+
<ul><li>
|
240
|
+
<p><tt>query</tt> - Search for artists by name using full text search. Results
|
241
|
+
from Songkick are returned by relevancy.</p>
|
242
|
+
</li></ul>
|
243
|
+
|
244
|
+
<h4>Query Parameters</h4>
|
245
|
+
<ul><li>
|
246
|
+
<p><tt>artist_name</tt> - Name of an artist. <em>Ex. ‘Lady Gaga’,
|
247
|
+
‘Slayer’, ‘Atmosphere’</em></p>
|
248
|
+
</li></ul>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<div class="method-source-code" id="artist_search-source">
|
253
|
+
<pre>
|
254
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 83</span>
|
255
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">artist_search</span>(<span class="ruby-identifier">query</span>={})
|
256
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-string">"/search/artists.json"</span>, <span class="ruby-value">:query</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">query</span>)
|
257
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">ArtistResult</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
258
|
+
<span class="ruby-keyword">end</span></pre>
|
259
|
+
</div><!-- artist_search-source -->
|
260
|
+
|
261
|
+
</div>
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
</div><!-- artist_search-method -->
|
267
|
+
|
268
|
+
|
269
|
+
<div id="concert_setlists-method" class="method-detail ">
|
270
|
+
<a name="method-i-concert_setlists"></a>
|
271
|
+
|
272
|
+
|
273
|
+
<div class="method-heading">
|
274
|
+
<span class="method-name">concert_setlists</span><span
|
275
|
+
class="method-args">(event_id)</span>
|
276
|
+
<span class="method-click-advice">click to toggle source</span>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
|
280
|
+
<div class="method-description">
|
281
|
+
|
282
|
+
<h4>Concert Setlists API</h4>
|
283
|
+
|
284
|
+
<p><a
|
285
|
+
href="http://www.songkick.com/developer/setlists">www.songkick.com/developer/setlists</a></p>
|
286
|
+
|
287
|
+
<h3>Parameters</h3>
|
288
|
+
<ul><li>
|
289
|
+
<p><tt>event_id</tt> - Songkick event ID. Extract the event ID either from a
|
290
|
+
previous API call or from the URL of the event page on the website.</p>
|
291
|
+
</li></ul>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
<div class="method-source-code" id="concert_setlists-source">
|
296
|
+
<pre>
|
297
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 133</span>
|
298
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">concert_setlists</span>(<span class="ruby-identifier">event_id</span>)
|
299
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"/events/#{event_id}/setlists.json"</span>)
|
300
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">ConcertSetlistResult</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
301
|
+
<span class="ruby-keyword">end</span></pre>
|
302
|
+
</div><!-- concert_setlists-source -->
|
303
|
+
|
304
|
+
</div>
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
</div><!-- concert_setlists-method -->
|
310
|
+
|
311
|
+
|
312
|
+
<div id="event-method" class="method-detail ">
|
313
|
+
<a name="method-i-event"></a>
|
314
|
+
|
315
|
+
|
316
|
+
<div class="method-heading">
|
317
|
+
<span class="method-name">event</span><span
|
318
|
+
class="method-args">(event_id)</span>
|
319
|
+
<span class="method-click-advice">click to toggle source</span>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
|
323
|
+
<div class="method-description">
|
324
|
+
|
325
|
+
<h4><a href="Event.html">Event</a> API</h4>
|
326
|
+
|
327
|
+
<p><a
|
328
|
+
href="http://www.songkick.com/developer/upcoming-events">www.songkick.com/developer/upcoming-events</a></p>
|
329
|
+
|
330
|
+
<p>Getting detailed information of a single event.</p>
|
331
|
+
|
332
|
+
<h3>Parameters</h3>
|
333
|
+
<ul><li>
|
334
|
+
<p><tt>event_id</tt> - Songkick event ID. Extract the event ID either from a
|
335
|
+
previous API call or from the URL of the event page on the website.</p>
|
336
|
+
</li></ul>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
<div class="method-source-code" id="event-source">
|
341
|
+
<pre>
|
342
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 50</span>
|
343
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">event</span>(<span class="ruby-identifier">event_id</span>)
|
344
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"/events/#{event_id}.json"</span>)
|
345
|
+
<span class="ruby-comment"># and now for some dirrty hack</span>
|
346
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">Event</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>[<span class="ruby-string">"resultsPage"</span>][<span class="ruby-string">"results"</span>][<span class="ruby-string">"event"</span>]
|
347
|
+
<span class="ruby-keyword">end</span></pre>
|
348
|
+
</div><!-- event-source -->
|
349
|
+
|
350
|
+
</div>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
</div><!-- event-method -->
|
356
|
+
|
357
|
+
|
358
|
+
<div id="events-method" class="method-detail ">
|
359
|
+
<a name="method-i-events"></a>
|
360
|
+
|
361
|
+
|
362
|
+
<div class="method-heading">
|
363
|
+
<span class="method-name">events</span><span
|
364
|
+
class="method-args">(query = {})</span>
|
365
|
+
<span class="method-click-advice">click to toggle source</span>
|
366
|
+
</div>
|
367
|
+
|
368
|
+
|
369
|
+
<div class="method-description">
|
370
|
+
|
371
|
+
<h4><a href="Event.html">Event</a> Search API</h4>
|
372
|
+
|
373
|
+
<p><a
|
374
|
+
href="http://www.songkick.com/developer/event-search">www.songkick.com/developer/event-search</a></p>
|
375
|
+
|
376
|
+
<h3>Parameters</h3>
|
377
|
+
<ul><li>
|
378
|
+
<p><tt>query</tt> - A hash of query parameters, see below for options.</p>
|
379
|
+
</li></ul>
|
380
|
+
|
381
|
+
<p><em>Example:</em> <tt>{ :type => 'concert', :artists => 'Coolio'
|
382
|
+
}</tt></p>
|
383
|
+
|
384
|
+
<h4>Query Parameters</h4>
|
385
|
+
<ul><li>
|
386
|
+
<p><tt>type</tt> - valid types: concert or festival</p>
|
387
|
+
</li><li>
|
388
|
+
<p><tt>artists</tt> - events by any of the artists, comma-separated</p>
|
389
|
+
</li><li>
|
390
|
+
<p><tt>artist_name</tt> - plain text name of artist ex. ‘As I Lay Dying’,
|
391
|
+
‘Parkway Drive’, ‘Animals As Leaders’</p>
|
392
|
+
</li><li>
|
393
|
+
<p><tt>artist_id</tt> - Songkick unique ID for an artist</p>
|
394
|
+
</li><li>
|
395
|
+
<p><tt>venue_id</tt> - Songkick unique ID for a venue</p>
|
396
|
+
</li><li>
|
397
|
+
<p><tt>setlist_item_name</tt> - name of a song which was played at the event
|
398
|
+
– use with artist_id or artist_name</p>
|
399
|
+
</li><li>
|
400
|
+
<p><tt>min_date</tt> - Oldest date for which you want to look for events</p>
|
401
|
+
</li><li>
|
402
|
+
<p><tt>max_date</tt> - Most recent date for which you want to look for events</p>
|
403
|
+
</li><li>
|
404
|
+
<p><tt>location</tt> - See the Songkick website for instructions on how to use
|
405
|
+
the location parameter <a
|
406
|
+
href="http://www.songkick.com/developer/location-search">www.songkick.com/developer/location-search</a></p>
|
407
|
+
</li></ul>
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
<div class="method-source-code" id="events-source">
|
412
|
+
<pre>
|
413
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 37</span>
|
414
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">events</span>(<span class="ruby-identifier">query</span> = {})
|
415
|
+
<span class="ruby-identifier">path</span> = <span class="ruby-identifier">extract_path_from_query</span>(<span class="ruby-identifier">query</span>)
|
416
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"#{path}/events.json"</span>, <span class="ruby-value">:query</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">query</span>)
|
417
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">EventResult</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
418
|
+
<span class="ruby-keyword">end</span></pre>
|
419
|
+
</div><!-- events-source -->
|
420
|
+
|
421
|
+
</div>
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</div><!-- events-method -->
|
427
|
+
|
428
|
+
|
429
|
+
<div id="gigography-method" class="method-detail ">
|
430
|
+
<a name="method-i-gigography"></a>
|
431
|
+
|
432
|
+
|
433
|
+
<div class="method-heading">
|
434
|
+
<span class="method-name">gigography</span><span
|
435
|
+
class="method-args">(artist_id, query= {})</span>
|
436
|
+
<span class="method-click-advice">click to toggle source</span>
|
437
|
+
</div>
|
438
|
+
|
439
|
+
|
440
|
+
<div class="method-description">
|
441
|
+
|
442
|
+
<h4>Gigography API</h4>
|
443
|
+
|
444
|
+
<p><a
|
445
|
+
href="http://groups.google.com/group/songkick-api/browse_thread/thread/af15b9a6ad3c3513">groups.google.com/group/songkick-api/browse_thread/thread/af15b9a6ad3c3513</a>#</p>
|
446
|
+
|
447
|
+
<h3>Parameters</h3>
|
448
|
+
<ul><li>
|
449
|
+
<p><tt>artist_id</tt> - Songkick artist_id, use <a
|
450
|
+
href="Remote.html#method-i-artist_search">artist_search</a> to get it</p>
|
451
|
+
</li><li>
|
452
|
+
<p><tt>query</tt> - A hash of query parameters, see below for options.</p>
|
453
|
+
</li></ul>
|
454
|
+
|
455
|
+
<h4>Query Parameters</h4>
|
456
|
+
<ul><li>
|
457
|
+
<p><tt>min_date</tt> - Oldest date for which you want to look for events</p>
|
458
|
+
</li><li>
|
459
|
+
<p><tt>max_date</tt> - Most recent date for which you want to look for events</p>
|
460
|
+
</li><li>
|
461
|
+
<p><tt>per_page</tt> - Number of items on a page</p>
|
462
|
+
</li><li>
|
463
|
+
<p><tt>page</tt> - Number of page</p>
|
464
|
+
</li></ul>
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
<div class="method-source-code" id="gigography-source">
|
469
|
+
<pre>
|
470
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 68</span>
|
471
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">gigography</span>(<span class="ruby-identifier">artist_id</span>, <span class="ruby-identifier">query</span>= {})
|
472
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"/artists/#{artist_id}/gigography.json"</span>,<span class="ruby-value">:query=</span><span class="ruby-operator">></span><span class="ruby-identifier">query</span>)
|
473
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">EventResult</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
474
|
+
<span class="ruby-keyword">end</span></pre>
|
475
|
+
</div><!-- gigography-source -->
|
476
|
+
|
477
|
+
</div>
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
</div><!-- gigography-method -->
|
483
|
+
|
484
|
+
|
485
|
+
<div id="location_search-method" class="method-detail ">
|
486
|
+
<a name="method-i-location_search"></a>
|
487
|
+
|
488
|
+
|
489
|
+
<div class="method-heading">
|
490
|
+
<span class="method-name">location_search</span><span
|
491
|
+
class="method-args">(query = {})</span>
|
492
|
+
<span class="method-click-advice">click to toggle source</span>
|
493
|
+
</div>
|
494
|
+
|
495
|
+
|
496
|
+
<div class="method-description">
|
497
|
+
|
498
|
+
<h4><a href="Location.html">Location</a> Search API</h4>
|
499
|
+
|
500
|
+
<p><a
|
501
|
+
href="http://www.songkick.com/developer/location-search">www.songkick.com/developer/location-search</a></p>
|
502
|
+
|
503
|
+
<h3>Parameters</h3>
|
504
|
+
<ul><li>
|
505
|
+
<p><tt>query</tt> - A hash of query parameters, see below for options.</p>
|
506
|
+
</li></ul>
|
507
|
+
|
508
|
+
<h4>Query Parameters</h4>
|
509
|
+
<ul><li>
|
510
|
+
<p><tt>location</tt> - ‘geo:{lat,lng}’ string <em>Ex.
|
511
|
+
‘geo:{-0.128,51.5078}’</em></p>
|
512
|
+
</li></ul>
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
<div class="method-source-code" id="location_search-source">
|
517
|
+
<pre>
|
518
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 146</span>
|
519
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">location_search</span>(<span class="ruby-identifier">query</span> = {})
|
520
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-string">"/search/locations.json"</span>, <span class="ruby-value">:query</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">query</span>)
|
521
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">LocationResult</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
522
|
+
<span class="ruby-keyword">end</span></pre>
|
523
|
+
</div><!-- location_search-source -->
|
524
|
+
|
525
|
+
</div>
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
</div><!-- location_search-method -->
|
531
|
+
|
532
|
+
|
533
|
+
<div id="metro_areas_events-method" class="method-detail ">
|
534
|
+
<a name="method-i-metro_areas_events"></a>
|
535
|
+
|
536
|
+
|
537
|
+
<div class="method-heading">
|
538
|
+
<span class="method-name">metro_areas_events</span><span
|
539
|
+
class="method-args">(metro_area_id, query = {})</span>
|
540
|
+
<span class="method-click-advice">click to toggle source</span>
|
541
|
+
</div>
|
542
|
+
|
543
|
+
|
544
|
+
<div class="method-description">
|
545
|
+
|
546
|
+
<h4>Metro Area Events (Upcoming)</h4>
|
547
|
+
|
548
|
+
<p>Returns an array of Events.</p>
|
549
|
+
|
550
|
+
<p><a
|
551
|
+
href="http://www.songkick.com/developer/upcoming-events-for-metro-area">www.songkick.com/developer/upcoming-events-for-metro-area</a></p>
|
552
|
+
|
553
|
+
<h3>Parameters</h3>
|
554
|
+
<ul><li>
|
555
|
+
<p><tt>metro_area_id</tt> - Songkick unique ID for metro areas. Use <a
|
556
|
+
href="Remote.html#method-i-location_search">location_search</a> to find a
|
557
|
+
metro area ID.</p>
|
558
|
+
</li><li>
|
559
|
+
<p><tt>query</tt> - A hash of query parameters, see below for options.</p>
|
560
|
+
</li></ul>
|
561
|
+
|
562
|
+
<h4>Query Parameters</h4>
|
563
|
+
<ul><li>
|
564
|
+
<p><tt>page</tt> - Page number</p>
|
565
|
+
</li><li>
|
566
|
+
<p><tt>per_page</tt> - Number of results per page, max 50.</p>
|
567
|
+
</li></ul>
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
<div class="method-source-code" id="metro_areas_events-source">
|
572
|
+
<pre>
|
573
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 122</span>
|
574
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">metro_areas_events</span>(<span class="ruby-identifier">metro_area_id</span>, <span class="ruby-identifier">query</span> = {})
|
575
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"/metro_areas/#{metro_area_id}/calendar.json"</span>, <span class="ruby-value">:query</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">query</span>)
|
576
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">EventResult</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
577
|
+
<span class="ruby-keyword">end</span></pre>
|
578
|
+
</div><!-- metro_areas_events-source -->
|
579
|
+
|
580
|
+
</div>
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
</div><!-- metro_areas_events-method -->
|
586
|
+
|
587
|
+
|
588
|
+
<div id="users_events-method" class="method-detail ">
|
589
|
+
<a name="method-i-users_events"></a>
|
590
|
+
|
591
|
+
|
592
|
+
<div class="method-heading">
|
593
|
+
<span class="method-name">users_events</span><span
|
594
|
+
class="method-args">(username, query = {})</span>
|
595
|
+
<span class="method-click-advice">click to toggle source</span>
|
596
|
+
</div>
|
597
|
+
|
598
|
+
|
599
|
+
<div class="method-description">
|
600
|
+
|
601
|
+
<h4>User Events API</h4>
|
602
|
+
|
603
|
+
<p><a
|
604
|
+
href="http://www.songkick.com/developer/upcoming-events-for-user">www.songkick.com/developer/upcoming-events-for-user</a></p>
|
605
|
+
|
606
|
+
<h3>Parameters</h3>
|
607
|
+
<ul><li>
|
608
|
+
<p><tt>username</tt> - A Songkick username.</p>
|
609
|
+
</li><li>
|
610
|
+
<p><tt>query</tt> - A hash of query parameters, see below for options.</p>
|
611
|
+
</li></ul>
|
612
|
+
|
613
|
+
<h4>Query Parameters</h4>
|
614
|
+
<ul><li>
|
615
|
+
<p><tt>attendance</tt> (all, im_going, i_might_go) - defaults to im_going</p>
|
616
|
+
</li><li>
|
617
|
+
<p><tt>type</tt> (concert or festival)</p>
|
618
|
+
</li><li>
|
619
|
+
<p><tt>artists</tt> (events by any of the artists, comma-separated)</p>
|
620
|
+
</li><li>
|
621
|
+
<p><tt>artist_id</tt> - Songkick unique ID for an artist</p>
|
622
|
+
</li><li>
|
623
|
+
<p><tt>venue_id</tt> - Songkick unique ID for a venue</p>
|
624
|
+
</li><li>
|
625
|
+
<p><tt>setlist_item_name</tt> (name of a song which was played at the event
|
626
|
+
– use with artist_id or artist_name)</p>
|
627
|
+
</li><li>
|
628
|
+
<p><tt>min_date</tt> - Oldest date for which you want to look for events</p>
|
629
|
+
</li><li>
|
630
|
+
<p><tt>max_date</tt> - Most recent date for which you want to look for events</p>
|
631
|
+
</li><li>
|
632
|
+
<p><tt>location</tt> - see the Songkick website for instructions on how to use
|
633
|
+
the location parameter</p>
|
634
|
+
</li></ul>
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
<div class="method-source-code" id="users_events-source">
|
639
|
+
<pre>
|
640
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 105</span>
|
641
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">users_events</span>(<span class="ruby-identifier">username</span>, <span class="ruby-identifier">query</span> = {})
|
642
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"/users/#{username}/events.json"</span>, <span class="ruby-value">:query</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">query</span>)
|
643
|
+
<span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">EventResult</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
644
|
+
<span class="ruby-keyword">end</span></pre>
|
645
|
+
</div><!-- users_events-source -->
|
646
|
+
|
647
|
+
</div>
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
</div><!-- users_events-method -->
|
653
|
+
|
654
|
+
|
655
|
+
</div><!-- public-instance-method-details -->
|
656
|
+
|
657
|
+
<div id="public-class-method-details" class="method-section section">
|
658
|
+
<h3 class="section-header">Public Class Methods</h3>
|
659
|
+
|
660
|
+
|
661
|
+
<div id="new-method" class="method-detail ">
|
662
|
+
<a name="method-c-new"></a>
|
663
|
+
|
664
|
+
|
665
|
+
<div class="method-heading">
|
666
|
+
<span class="method-name">new</span><span
|
667
|
+
class="method-args">(api_key = nil)</span>
|
668
|
+
<span class="method-click-advice">click to toggle source</span>
|
669
|
+
</div>
|
670
|
+
|
671
|
+
|
672
|
+
<div class="method-description">
|
673
|
+
|
674
|
+
<h4>Create a new instance of the remote class to talk to Songkick</h4>
|
675
|
+
|
676
|
+
<p>Get an API key for your app from <a
|
677
|
+
href="http://developer.songkick.com/">developer.songkick.com/</a></p>
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
<div class="method-source-code" id="new-source">
|
682
|
+
<pre>
|
683
|
+
<span class="ruby-comment"># File lib/songkickr/remote.rb, line 12</span>
|
684
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">api_key</span> = <span class="ruby-keyword">nil</span>)
|
685
|
+
<span class="ruby-ivar">@api_key</span> = <span class="ruby-identifier">api_key</span>
|
686
|
+
<span class="ruby-ivar">@api_key</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Songkickr</span>.<span class="ruby-identifier">api_key</span>
|
687
|
+
|
688
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">default_params</span> <span class="ruby-value">:apikey</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@api_key</span>
|
689
|
+
<span class="ruby-keyword">end</span></pre>
|
690
|
+
</div><!-- new-source -->
|
691
|
+
|
692
|
+
</div>
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
</div><!-- new-method -->
|
698
|
+
|
699
|
+
|
700
|
+
</div><!-- public-class-method-details -->
|
701
|
+
|
702
|
+
</div><!-- 5Buntitled-5D -->
|
703
|
+
|
704
|
+
|
705
|
+
</div><!-- documentation -->
|
706
|
+
|
707
|
+
<div id="validator-badges">
|
708
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
709
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
710
|
+
Rdoc Generator</a> 2</small>.</p>
|
711
|
+
</div>
|
712
|
+
|
713
|
+
</body>
|
714
|
+
</html>
|
715
|
+
|