songkickr 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.bundle/config +2 -0
- data/.gitignore +1 -0
- data/.travis.yml +8 -0
- data/Gemfile.lock +42 -22
- data/LICENSE +1 -1
- data/README.rdoc +14 -9
- data/Rakefile +3 -4
- data/lib/songkickr/artist.rb +2 -2
- data/lib/songkickr/artist_result.rb +4 -24
- data/lib/songkickr/calendar_entry.rb +23 -0
- data/lib/songkickr/calendar_result.rb +10 -0
- data/lib/songkickr/concert_setlist_result.rb +5 -27
- data/lib/songkickr/event.rb +8 -14
- data/lib/songkickr/event_result.rb +5 -23
- data/lib/songkickr/location.rb +4 -4
- data/lib/songkickr/location_result.rb +5 -30
- data/lib/songkickr/metro_area.rb +28 -0
- data/lib/songkickr/metro_area_result.rb +12 -0
- data/lib/songkickr/performance.rb +17 -12
- data/lib/songkickr/remote.rb +18 -198
- data/lib/songkickr/remote_api/artist_details.rb +17 -0
- data/lib/songkickr/remote_api/event_details.rb +17 -0
- data/lib/songkickr/remote_api/past_events.rb +48 -0
- data/lib/songkickr/remote_api/similar_artists.rb +14 -0
- data/lib/songkickr/remote_api/upcoming_events.rb +125 -0
- data/lib/songkickr/remote_api/user_events_and_trackings.rb +143 -0
- data/lib/songkickr/remote_api/venue_details.rb +16 -0
- data/lib/songkickr/result_set.rb +27 -0
- data/lib/songkickr/setlist.rb +7 -12
- data/lib/songkickr/setlist_item.rb +1 -1
- data/lib/songkickr/tracking.rb +18 -0
- data/lib/songkickr/tracking_result.rb +24 -0
- data/lib/songkickr/venue.rb +10 -2
- data/lib/songkickr/venue_result.rb +32 -0
- data/lib/songkickr/version.rb +1 -1
- data/lib/songkickr.rb +24 -17
- data/songkickr.gemspec +17 -44
- data/test/fixtures/event_7391451.json +732 -1
- data/test/fixtures/location_search.json +38 -0
- data/test/fixtures/metro_area.json +11 -0
- data/test/fixtures/users_attendance_calendar.json +243 -0
- data/test/fixtures/vcr/artist_events.yml +1394 -0
- data/test/fixtures/vcr/artist_search.yml +38 -0
- data/test/fixtures/vcr/artists_gigography.yml +187 -0
- data/test/fixtures/vcr/concert_setlists.yml +47 -0
- data/test/fixtures/vcr/event_search.yml +110 -0
- data/test/fixtures/vcr/invalid_api_key.yml +6 -36
- data/test/fixtures/vcr/invalid_artist_id.yml +6 -6
- data/test/fixtures/vcr/invalid_event_id.yml +6 -6
- data/test/fixtures/vcr/invalid_user.yml +6 -6
- data/test/fixtures/vcr/invalid_venue_id.yml +6 -6
- data/test/fixtures/vcr/location_search.yml +42 -0
- data/test/fixtures/vcr/metro_areas_events.yml +1535 -0
- data/test/fixtures/vcr/similar_artists.yml +64 -0
- data/test/fixtures/vcr/users_artist_tracking.yml +99 -0
- data/test/fixtures/vcr/users_attendance.yml +66 -0
- data/test/fixtures/vcr/users_attendance_calendar.yml +51 -0
- data/test/fixtures/vcr/users_events.yml +809 -0
- data/test/fixtures/vcr/users_gigography.yml +2782 -0
- data/test/fixtures/vcr/users_metro_area_tracking.yml +66 -0
- data/test/fixtures/vcr/users_muted_artists.yml +66 -0
- data/test/fixtures/vcr/users_tracked_artists.yml +75 -0
- data/test/fixtures/vcr/users_tracked_events_calendar.yml +1901 -0
- data/test/fixtures/vcr/users_tracked_metro_areas.yml +37 -0
- data/test/fixtures/vcr/valid_artist.yml +9 -9
- data/test/fixtures/vcr/valid_event.yml +103 -38
- data/test/fixtures/vcr/valid_user.yml +634 -44
- data/test/fixtures/vcr/valid_venue.yml +25 -26
- data/test/fixtures/vcr/venue_calendar.yml +500 -0
- data/test/fixtures/vcr/venue_search.yml +42 -0
- data/test/helper.rb +1 -27
- data/test/songkickr/test_calendar_entry.rb +15 -0
- data/test/songkickr/test_event.rb +8 -9
- data/test/songkickr/test_location.rb +11 -11
- data/test/songkickr/test_metro_area.rb +17 -0
- data/test/songkickr/test_remote.rb +149 -3
- data/test/songkickr/test_setlist_item.rb +20 -0
- data/test/songkickr/test_venue.rb +1 -2
- data/test.rb +3 -5
- metadata +120 -152
- data/bin/autospec +0 -16
- data/bin/convert_to_should_syntax +0 -16
- data/bin/guard +0 -16
- data/bin/htmldiff +0 -16
- data/bin/httparty +0 -16
- data/bin/jeweler +0 -16
- data/bin/ldiff +0 -16
- data/bin/rake +0 -16
- data/bin/rake2thor +0 -16
- data/bin/rg +0 -16
- data/bin/ri +0 -16
- data/bin/rspec +0 -16
- data/bin/thor +0 -16
- data/doc/APIError.html +0 -241
- data/doc/APIKeyNotSet.html +0 -203
- data/doc/LICENSE.html +0 -133
- data/doc/README_rdoc.html +0 -173
- data/doc/ResourceNotFound.html +0 -203
- data/doc/Songkickr/Artist.html +0 -278
- data/doc/Songkickr/ArtistResult.html +0 -308
- data/doc/Songkickr/ConcertSetlistResult.html +0 -283
- data/doc/Songkickr/Event.html +0 -491
- data/doc/Songkickr/EventResult.html +0 -306
- data/doc/Songkickr/Location.html +0 -299
- data/doc/Songkickr/LocationResult.html +0 -309
- data/doc/Songkickr/Performance.html +0 -295
- data/doc/Songkickr/Remote.html +0 -864
- data/doc/Songkickr/Setlist.html +0 -360
- data/doc/Songkickr/SetlistItem.html +0 -244
- data/doc/Songkickr/Venue.html +0 -265
- data/doc/Songkickr.html +0 -261
- data/doc/created.rid +0 -16
- data/doc/images/add.png +0 -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/delete.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_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.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 +0 -110
- data/doc/js/darkfish.js +0 -153
- data/doc/js/jquery.js +0 -18
- data/doc/js/navigation.js +0 -142
- data/doc/js/quicksearch.js +0 -114
- data/doc/js/search.js +0 -94
- data/doc/js/search_index.js +0 -1
- data/doc/js/searcher.js +0 -228
- data/doc/js/thickbox-compressed.js +0 -10
- data/doc/lib/songkickr/artist_rb.html +0 -52
- data/doc/lib/songkickr/artist_result_rb.html +0 -52
- data/doc/lib/songkickr/concert_setlist_result_rb.html +0 -52
- data/doc/lib/songkickr/event_rb.html +0 -52
- data/doc/lib/songkickr/event_result_rb.html +0 -52
- data/doc/lib/songkickr/location_rb.html +0 -52
- data/doc/lib/songkickr/location_result_rb.html +0 -52
- data/doc/lib/songkickr/performance_rb.html +0 -52
- data/doc/lib/songkickr/remote_rb.html +0 -52
- data/doc/lib/songkickr/setlist_item_rb.html +0 -52
- data/doc/lib/songkickr/setlist_rb.html +0 -52
- data/doc/lib/songkickr/venue_rb.html +0 -52
- data/doc/lib/songkickr_rb.html +0 -56
- data/doc/rdoc.css +0 -543
- data/doc/table_of_contents.html +0 -185
- data/test/fixtures/locations_bar.json +0 -1
@@ -1,306 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>class Songkickr::EventResult - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "../";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="../index.html">Home</a>
|
28
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
<div id="file-metadata">
|
47
|
-
<nav id="file-list-section" class="section">
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
49
|
-
<ul>
|
50
|
-
<li>lib/songkickr/event_result.rb
|
51
|
-
</ul>
|
52
|
-
</nav>
|
53
|
-
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div id="class-metadata">
|
58
|
-
|
59
|
-
<nav id="parent-class-section" class="section">
|
60
|
-
<h3 class="section-header">Parent</h3>
|
61
|
-
|
62
|
-
<p class="link">Object
|
63
|
-
|
64
|
-
</nav>
|
65
|
-
|
66
|
-
|
67
|
-
<!-- Method Quickref -->
|
68
|
-
<nav id="method-list-section" class="section">
|
69
|
-
<h3 class="section-header">Methods</h3>
|
70
|
-
|
71
|
-
<ul class="link-list">
|
72
|
-
|
73
|
-
<li><a href="#method-c-new">::new</a>
|
74
|
-
|
75
|
-
<li><a href="#method-i-parse_results">#parse_results</a>
|
76
|
-
|
77
|
-
</ul>
|
78
|
-
</nav>
|
79
|
-
|
80
|
-
</div>
|
81
|
-
|
82
|
-
<div id="project-metadata">
|
83
|
-
<nav id="fileindex-section" class="section project-section">
|
84
|
-
<h3 class="section-header">Pages</h3>
|
85
|
-
|
86
|
-
<ul>
|
87
|
-
|
88
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
89
|
-
|
90
|
-
<li class="file"><a href="../README_rdoc.html">README</a>
|
91
|
-
|
92
|
-
</ul>
|
93
|
-
</nav>
|
94
|
-
|
95
|
-
<nav id="classindex-section" class="section project-section">
|
96
|
-
<h3 class="section-header">Class and Module Index</h3>
|
97
|
-
|
98
|
-
<ul class="link-list">
|
99
|
-
|
100
|
-
<li><a href="../Songkickr.html">Songkickr</a>
|
101
|
-
|
102
|
-
<li><a href="../Songkickr/Artist.html">Songkickr::Artist</a>
|
103
|
-
|
104
|
-
<li><a href="../Songkickr/ArtistResult.html">Songkickr::ArtistResult</a>
|
105
|
-
|
106
|
-
<li><a href="../Songkickr/ConcertSetlistResult.html">Songkickr::ConcertSetlistResult</a>
|
107
|
-
|
108
|
-
<li><a href="../Songkickr/Event.html">Songkickr::Event</a>
|
109
|
-
|
110
|
-
<li><a href="../Songkickr/EventResult.html">Songkickr::EventResult</a>
|
111
|
-
|
112
|
-
<li><a href="../Songkickr/Location.html">Songkickr::Location</a>
|
113
|
-
|
114
|
-
<li><a href="../Songkickr/LocationResult.html">Songkickr::LocationResult</a>
|
115
|
-
|
116
|
-
<li><a href="../Songkickr/Performance.html">Songkickr::Performance</a>
|
117
|
-
|
118
|
-
<li><a href="../Songkickr/Remote.html">Songkickr::Remote</a>
|
119
|
-
|
120
|
-
<li><a href="../Songkickr/Setlist.html">Songkickr::Setlist</a>
|
121
|
-
|
122
|
-
<li><a href="../Songkickr/SetlistItem.html">Songkickr::SetlistItem</a>
|
123
|
-
|
124
|
-
<li><a href="../Songkickr/Venue.html">Songkickr::Venue</a>
|
125
|
-
|
126
|
-
<li><a href="../APIError.html">APIError</a>
|
127
|
-
|
128
|
-
<li><a href="../APIKeyNotSet.html">APIKeyNotSet</a>
|
129
|
-
|
130
|
-
<li><a href="../ResourceNotFound.html">ResourceNotFound</a>
|
131
|
-
|
132
|
-
</ul>
|
133
|
-
</nav>
|
134
|
-
|
135
|
-
</div>
|
136
|
-
</nav>
|
137
|
-
|
138
|
-
<div id="documentation">
|
139
|
-
<h1 class="class">class Songkickr::EventResult</h1>
|
140
|
-
|
141
|
-
<div id="description" class="description">
|
142
|
-
|
143
|
-
<p>A class to represent the result hash of an <a href="Event.html">Event</a>
|
144
|
-
search.</p>
|
145
|
-
|
146
|
-
</div><!-- description -->
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<!-- Attributes -->
|
160
|
-
<section id="attribute-method-details" class="method-section section">
|
161
|
-
<h3 class="section-header">Attributes</h3>
|
162
|
-
|
163
|
-
|
164
|
-
<div id="attribute-i-page" class="method-detail">
|
165
|
-
<div class="method-heading attribute-method-heading">
|
166
|
-
<span class="method-name">page</span><span
|
167
|
-
class="attribute-access-type">[RW]</span>
|
168
|
-
</div>
|
169
|
-
|
170
|
-
<div class="method-description">
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</div>
|
175
|
-
</div>
|
176
|
-
|
177
|
-
<div id="attribute-i-results" class="method-detail">
|
178
|
-
<div class="method-heading attribute-method-heading">
|
179
|
-
<span class="method-name">results</span><span
|
180
|
-
class="attribute-access-type">[RW]</span>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
<div class="method-description">
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
|
190
|
-
<div id="attribute-i-total_entries" class="method-detail">
|
191
|
-
<div class="method-heading attribute-method-heading">
|
192
|
-
<span class="method-name">total_entries</span><span
|
193
|
-
class="attribute-access-type">[RW]</span>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div class="method-description">
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
|
203
|
-
</section><!-- attribute-method-details -->
|
204
|
-
|
205
|
-
|
206
|
-
<!-- Methods -->
|
207
|
-
|
208
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
209
|
-
<h3 class="section-header">Public Class Methods</h3>
|
210
|
-
|
211
|
-
|
212
|
-
<div id="method-c-new" class="method-detail ">
|
213
|
-
|
214
|
-
<div class="method-heading">
|
215
|
-
<span class="method-name">new</span><span
|
216
|
-
class="method-args">(result_hash = {})</span>
|
217
|
-
<span class="method-click-advice">click to toggle source</span>
|
218
|
-
</div>
|
219
|
-
|
220
|
-
|
221
|
-
<div class="method-description">
|
222
|
-
|
223
|
-
<p>Takes the result hash directly and parses out the page and total entries
|
224
|
-
and finally passes off to the <a
|
225
|
-
href="EventResult.html#method-i-parse_results">#parse_results</a> method to
|
226
|
-
get the results.</p>
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
<div class="method-source-code" id="new-source">
|
231
|
-
<pre><span class="ruby-comment"># File lib/songkickr/event_result.rb, line 7</span>
|
232
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">result_hash</span> = {})
|
233
|
-
<span class="ruby-identifier">results_page</span> = <span class="ruby-identifier">result_hash</span>[<span class="ruby-string">"resultsPage"</span>]
|
234
|
-
|
235
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">results_page</span>
|
236
|
-
<span class="ruby-ivar">@page</span> = <span class="ruby-identifier">results_page</span>[<span class="ruby-string">"page"</span>]
|
237
|
-
<span class="ruby-ivar">@total_entries</span> = <span class="ruby-identifier">results_page</span>[<span class="ruby-string">"totalEntries"</span>]
|
238
|
-
<span class="ruby-ivar">@results</span> = <span class="ruby-identifier">parse_results</span> <span class="ruby-identifier">results_page</span>[<span class="ruby-string">"results"</span>]
|
239
|
-
<span class="ruby-keyword">end</span>
|
240
|
-
<span class="ruby-keyword">end</span></pre>
|
241
|
-
</div><!-- new-source -->
|
242
|
-
|
243
|
-
</div>
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
</div><!-- new-method -->
|
249
|
-
|
250
|
-
|
251
|
-
</section><!-- public-class-method-details -->
|
252
|
-
|
253
|
-
<section id="protected-instance-5Buntitled-5D-method-details" class="method-section section">
|
254
|
-
<h3 class="section-header">Protected Instance Methods</h3>
|
255
|
-
|
256
|
-
|
257
|
-
<div id="method-i-parse_results" class="method-detail ">
|
258
|
-
|
259
|
-
<div class="method-heading">
|
260
|
-
<span class="method-name">parse_results</span><span
|
261
|
-
class="method-args">(results = {})</span>
|
262
|
-
<span class="method-click-advice">click to toggle source</span>
|
263
|
-
</div>
|
264
|
-
|
265
|
-
|
266
|
-
<div class="method-description">
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
<div class="method-source-code" id="parse_results-source">
|
273
|
-
<pre><span class="ruby-comment"># File lib/songkickr/event_result.rb, line 20</span>
|
274
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">parse_results</span>(<span class="ruby-identifier">results</span> = {})
|
275
|
-
<span class="ruby-identifier">events</span> = []
|
276
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">results</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">"event"</span>)
|
277
|
-
<span class="ruby-identifier">results</span>[<span class="ruby-string">"event"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">event</span><span class="ruby-operator">|</span>
|
278
|
-
<span class="ruby-identifier">events</span> <span class="ruby-operator"><<</span> <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">event</span>)
|
279
|
-
<span class="ruby-keyword">end</span>
|
280
|
-
<span class="ruby-keyword">end</span>
|
281
|
-
|
282
|
-
<span class="ruby-identifier">events</span>
|
283
|
-
<span class="ruby-keyword">end</span></pre>
|
284
|
-
</div><!-- parse_results-source -->
|
285
|
-
|
286
|
-
</div>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
</div><!-- parse_results-method -->
|
292
|
-
|
293
|
-
|
294
|
-
</section><!-- protected-instance-method-details -->
|
295
|
-
|
296
|
-
</section><!-- 5Buntitled-5D -->
|
297
|
-
|
298
|
-
</div><!-- documentation -->
|
299
|
-
|
300
|
-
|
301
|
-
<footer id="validator-badges">
|
302
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
303
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
304
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
305
|
-
</footer>
|
306
|
-
|
data/doc/Songkickr/Location.html
DELETED
@@ -1,299 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>class Songkickr::Location - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "../";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="../index.html">Home</a>
|
28
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
<div id="file-metadata">
|
47
|
-
<nav id="file-list-section" class="section">
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
49
|
-
<ul>
|
50
|
-
<li>lib/songkickr/location.rb
|
51
|
-
</ul>
|
52
|
-
</nav>
|
53
|
-
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div id="class-metadata">
|
58
|
-
|
59
|
-
<nav id="parent-class-section" class="section">
|
60
|
-
<h3 class="section-header">Parent</h3>
|
61
|
-
|
62
|
-
<p class="link">Object
|
63
|
-
|
64
|
-
</nav>
|
65
|
-
|
66
|
-
|
67
|
-
<!-- Method Quickref -->
|
68
|
-
<nav id="method-list-section" class="section">
|
69
|
-
<h3 class="section-header">Methods</h3>
|
70
|
-
|
71
|
-
<ul class="link-list">
|
72
|
-
|
73
|
-
<li><a href="#method-c-new">::new</a>
|
74
|
-
|
75
|
-
</ul>
|
76
|
-
</nav>
|
77
|
-
|
78
|
-
</div>
|
79
|
-
|
80
|
-
<div id="project-metadata">
|
81
|
-
<nav id="fileindex-section" class="section project-section">
|
82
|
-
<h3 class="section-header">Pages</h3>
|
83
|
-
|
84
|
-
<ul>
|
85
|
-
|
86
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
87
|
-
|
88
|
-
<li class="file"><a href="../README_rdoc.html">README</a>
|
89
|
-
|
90
|
-
</ul>
|
91
|
-
</nav>
|
92
|
-
|
93
|
-
<nav id="classindex-section" class="section project-section">
|
94
|
-
<h3 class="section-header">Class and Module Index</h3>
|
95
|
-
|
96
|
-
<ul class="link-list">
|
97
|
-
|
98
|
-
<li><a href="../Songkickr.html">Songkickr</a>
|
99
|
-
|
100
|
-
<li><a href="../Songkickr/Artist.html">Songkickr::Artist</a>
|
101
|
-
|
102
|
-
<li><a href="../Songkickr/ArtistResult.html">Songkickr::ArtistResult</a>
|
103
|
-
|
104
|
-
<li><a href="../Songkickr/ConcertSetlistResult.html">Songkickr::ConcertSetlistResult</a>
|
105
|
-
|
106
|
-
<li><a href="../Songkickr/Event.html">Songkickr::Event</a>
|
107
|
-
|
108
|
-
<li><a href="../Songkickr/EventResult.html">Songkickr::EventResult</a>
|
109
|
-
|
110
|
-
<li><a href="../Songkickr/Location.html">Songkickr::Location</a>
|
111
|
-
|
112
|
-
<li><a href="../Songkickr/LocationResult.html">Songkickr::LocationResult</a>
|
113
|
-
|
114
|
-
<li><a href="../Songkickr/Performance.html">Songkickr::Performance</a>
|
115
|
-
|
116
|
-
<li><a href="../Songkickr/Remote.html">Songkickr::Remote</a>
|
117
|
-
|
118
|
-
<li><a href="../Songkickr/Setlist.html">Songkickr::Setlist</a>
|
119
|
-
|
120
|
-
<li><a href="../Songkickr/SetlistItem.html">Songkickr::SetlistItem</a>
|
121
|
-
|
122
|
-
<li><a href="../Songkickr/Venue.html">Songkickr::Venue</a>
|
123
|
-
|
124
|
-
<li><a href="../APIError.html">APIError</a>
|
125
|
-
|
126
|
-
<li><a href="../APIKeyNotSet.html">APIKeyNotSet</a>
|
127
|
-
|
128
|
-
<li><a href="../ResourceNotFound.html">ResourceNotFound</a>
|
129
|
-
|
130
|
-
</ul>
|
131
|
-
</nav>
|
132
|
-
|
133
|
-
</div>
|
134
|
-
</nav>
|
135
|
-
|
136
|
-
<div id="documentation">
|
137
|
-
<h1 class="class">class Songkickr::Location</h1>
|
138
|
-
|
139
|
-
<div id="description" class="description">
|
140
|
-
|
141
|
-
<p>A class to represent the hash of a <a href="Location.html">Location</a>.</p>
|
142
|
-
|
143
|
-
<pre>{
|
144
|
-
"city":{
|
145
|
-
"displayName":"London",
|
146
|
-
"country":{
|
147
|
-
"displayName":"UK"},
|
148
|
-
"lng":-0.128,
|
149
|
-
"lat":51.5078
|
150
|
-
},
|
151
|
-
"metroArea":{
|
152
|
-
"uri":"http://www.songkick.com/metro_areas/24426-uk-london",
|
153
|
-
"displayName":"London",
|
154
|
-
"country":{ "displayName":"UK" },
|
155
|
-
"id":24426,
|
156
|
-
"lng":-0.128,
|
157
|
-
"lat":51.5078
|
158
|
-
}
|
159
|
-
}
|
160
|
-
}</pre>
|
161
|
-
|
162
|
-
<p><a
|
163
|
-
href="http://www.songkick.com/developer/location-search">www.songkick.com/developer/location-search</a></p>
|
164
|
-
|
165
|
-
</div><!-- description -->
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
<!-- Attributes -->
|
179
|
-
<section id="attribute-method-details" class="method-section section">
|
180
|
-
<h3 class="section-header">Attributes</h3>
|
181
|
-
|
182
|
-
|
183
|
-
<div id="attribute-i-city" class="method-detail">
|
184
|
-
<div class="method-heading attribute-method-heading">
|
185
|
-
<span class="method-name">city</span><span
|
186
|
-
class="attribute-access-type">[RW]</span>
|
187
|
-
</div>
|
188
|
-
|
189
|
-
<div class="method-description">
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
</div>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div id="attribute-i-lat" class="method-detail">
|
197
|
-
<div class="method-heading attribute-method-heading">
|
198
|
-
<span class="method-name">lat</span><span
|
199
|
-
class="attribute-access-type">[RW]</span>
|
200
|
-
</div>
|
201
|
-
|
202
|
-
<div class="method-description">
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
</div>
|
207
|
-
</div>
|
208
|
-
|
209
|
-
<div id="attribute-i-lng" class="method-detail">
|
210
|
-
<div class="method-heading attribute-method-heading">
|
211
|
-
<span class="method-name">lng</span><span
|
212
|
-
class="attribute-access-type">[RW]</span>
|
213
|
-
</div>
|
214
|
-
|
215
|
-
<div class="method-description">
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
</div>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
<div id="attribute-i-metro_area" class="method-detail">
|
223
|
-
<div class="method-heading attribute-method-heading">
|
224
|
-
<span class="method-name">metro_area</span><span
|
225
|
-
class="attribute-access-type">[RW]</span>
|
226
|
-
</div>
|
227
|
-
|
228
|
-
<div class="method-description">
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
</div>
|
233
|
-
</div>
|
234
|
-
|
235
|
-
</section><!-- attribute-method-details -->
|
236
|
-
|
237
|
-
|
238
|
-
<!-- Methods -->
|
239
|
-
|
240
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
241
|
-
<h3 class="section-header">Public Class Methods</h3>
|
242
|
-
|
243
|
-
|
244
|
-
<div id="method-c-new" class="method-detail ">
|
245
|
-
|
246
|
-
<div class="method-heading">
|
247
|
-
<span class="method-name">new</span><span
|
248
|
-
class="method-args">(location_hash)</span>
|
249
|
-
<span class="method-click-advice">click to toggle source</span>
|
250
|
-
</div>
|
251
|
-
|
252
|
-
|
253
|
-
<div class="method-description">
|
254
|
-
|
255
|
-
<p>Takes a location hash. Handles the different city hashes from <a
|
256
|
-
href="Event.html">Event</a> and <a href="Location.html">Location</a></p>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
<div class="method-source-code" id="new-source">
|
261
|
-
<pre><span class="ruby-comment"># File lib/songkickr/location.rb, line 28</span>
|
262
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">location_hash</span>)
|
263
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">location_hash</span>[<span class="ruby-string">"city"</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>) <span class="ruby-comment"># location in Event</span>
|
264
|
-
<span class="ruby-ivar">@city</span> = <span class="ruby-identifier">location_hash</span>[<span class="ruby-string">"city"</span>]
|
265
|
-
<span class="ruby-ivar">@lat</span> = <span class="ruby-identifier">location_hash</span>[<span class="ruby-string">"lat"</span>]
|
266
|
-
<span class="ruby-ivar">@lng</span> = <span class="ruby-identifier">location_hash</span>[<span class="ruby-string">"lng"</span>]
|
267
|
-
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">location_hash</span>[<span class="ruby-string">"city"</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-comment"># stand-alone Location</span>
|
268
|
-
<span class="ruby-identifier">city_hash</span> = <span class="ruby-identifier">location_hash</span>[<span class="ruby-string">"city"</span>]
|
269
|
-
<span class="ruby-ivar">@city</span> = <span class="ruby-identifier">city_hash</span>[<span class="ruby-string">"displayName"</span>]
|
270
|
-
<span class="ruby-comment"># some locations have a null lng, lat in city hash, but have non-null in metroArea hash</span>
|
271
|
-
<span class="ruby-ivar">@lat</span> = <span class="ruby-identifier">city_hash</span>[<span class="ruby-string">"lat"</span>]
|
272
|
-
<span class="ruby-ivar">@lng</span> = <span class="ruby-identifier">city_hash</span>[<span class="ruby-string">"lng"</span>]
|
273
|
-
<span class="ruby-keyword">end</span>
|
274
|
-
|
275
|
-
<span class="ruby-ivar">@metro_area</span> = <span class="ruby-identifier">location_hash</span>[<span class="ruby-string">'metro_area'</span>]
|
276
|
-
<span class="ruby-keyword">end</span></pre>
|
277
|
-
</div><!-- new-source -->
|
278
|
-
|
279
|
-
</div>
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
</div><!-- new-method -->
|
285
|
-
|
286
|
-
|
287
|
-
</section><!-- public-class-method-details -->
|
288
|
-
|
289
|
-
</section><!-- 5Buntitled-5D -->
|
290
|
-
|
291
|
-
</div><!-- documentation -->
|
292
|
-
|
293
|
-
|
294
|
-
<footer id="validator-badges">
|
295
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
296
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
297
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
298
|
-
</footer>
|
299
|
-
|