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
data/test/helper.rb
CHANGED
@@ -1,23 +1,15 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'test/unit'
|
3
2
|
require 'shoulda'
|
4
3
|
require 'fakeweb'
|
5
|
-
|
4
|
+
|
6
5
|
require 'crack'
|
7
6
|
|
8
7
|
FakeWeb.allow_net_connect = false
|
9
8
|
|
10
|
-
|
11
9
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
12
10
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
13
11
|
require 'songkickr'
|
14
12
|
|
15
|
-
class Test::Unit::TestCase
|
16
|
-
end
|
17
|
-
|
18
|
-
def songkick_url(url)
|
19
|
-
url =~ /^http/ ? url : "http://api.songkick.com/api/3.0#{url}"
|
20
|
-
end
|
21
13
|
|
22
14
|
def fixture_file(filename)
|
23
15
|
return "" if filename == ""
|
@@ -28,21 +20,3 @@ end
|
|
28
20
|
def fixture_hash(filename)
|
29
21
|
Crack::JSON.parse(fixture_file(filename))
|
30
22
|
end
|
31
|
-
|
32
|
-
def stub_get(url, filename, status = nil)
|
33
|
-
options = {:body => fixture_file(filename)}
|
34
|
-
options.merge!({:status => status}) unless status.nil?
|
35
|
-
FakeWeb.register_uri(:get, songkick_url(url), options)
|
36
|
-
end
|
37
|
-
|
38
|
-
def stub_post(url, filename)
|
39
|
-
FakeWeb.register_uri(:post, songkick_url(url), :body => fixture_file(filename))
|
40
|
-
end
|
41
|
-
|
42
|
-
def stub_put(url, filename)
|
43
|
-
FakeWeb.register_uri(:put, songkick_url(url), :body => fixture_file(filename))
|
44
|
-
end
|
45
|
-
|
46
|
-
def stub_delete(url, filename)
|
47
|
-
FakeWeb.register_uri(:delete, songkick_url(url), :body => fixture_file(filename))
|
48
|
-
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestCalendarEntry < Test::Unit::TestCase
|
4
|
+
context "Given a CalendarEntry from fixture" do
|
5
|
+
setup do
|
6
|
+
@calendar_entry = Songkickr::CalendarEntry.new fixture_hash('users_attendance_calendar.json')["resultsPage"]["results"]["calendarEntry"][0]
|
7
|
+
end
|
8
|
+
|
9
|
+
should "properly load data from JSON" do
|
10
|
+
assert_equal "2013-07-28T07:08:44+0100", @calendar_entry.created_at
|
11
|
+
assert_equal Songkickr::Event, @calendar_entry.event.class
|
12
|
+
assert_equal "i_might_go", @calendar_entry.reason
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -1,18 +1,17 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class TestEvent < Test::Unit::TestCase
|
4
4
|
context "Given an Event from fixture" do
|
5
5
|
setup do
|
6
|
-
@event = Songkickr::Event.new(fixture_hash('event_7391451.json')["resultsPage"]["results"]["event"])
|
6
|
+
@event = Songkickr::Event.new(fixture_hash('event_7391451.json')["resultsPage"]["results"]["event"][0])
|
7
7
|
end
|
8
8
|
|
9
9
|
should "properly load data from JSON" do
|
10
|
-
assert_equal "
|
11
|
-
assert_equal "
|
12
|
-
assert_equal "
|
13
|
-
assert_equal
|
14
|
-
assert_equal "
|
10
|
+
assert_equal "Festival", @event.type
|
11
|
+
assert_equal "Santa Barbara, CA, US", @event.location.city
|
12
|
+
assert_equal "Earl Warren Showgrounds", @event.venue.display_name
|
13
|
+
assert_equal 27, @event.performances.size
|
14
|
+
assert_equal "The Ghost Inside", @event.performances.first.display_name
|
15
15
|
end
|
16
|
-
|
17
|
-
end
|
16
|
+
end
|
18
17
|
end
|
@@ -1,21 +1,21 @@
|
|
1
1
|
require 'helper'
|
2
|
+
require 'pry'
|
2
3
|
|
3
4
|
class TestLocation < Test::Unit::TestCase
|
4
5
|
context "Given Locations from fixture" do
|
5
6
|
setup do
|
6
|
-
@locations = Songkickr::LocationResult.new(fixture_hash('
|
7
|
+
@locations = Songkickr::LocationResult.new(fixture_hash('location_search.json'))
|
7
8
|
end
|
8
9
|
|
9
10
|
should "properly load data from JSON" do
|
10
|
-
assert_equal
|
11
|
-
assert_equal
|
12
|
-
|
13
|
-
|
14
|
-
assert_equal "
|
15
|
-
assert_equal
|
16
|
-
assert_equal -
|
17
|
-
assert_equal
|
11
|
+
assert_equal 1, @locations.results.size
|
12
|
+
assert_equal 1, @locations.total_entries
|
13
|
+
|
14
|
+
twin_cities = @locations.results.first
|
15
|
+
assert_equal "Twin Cities", twin_cities.city
|
16
|
+
assert_equal 44.9801, twin_cities.lat
|
17
|
+
assert_equal -93.2519, twin_cities.lng
|
18
|
+
assert_equal 35130, twin_cities.metro_area.id
|
18
19
|
end
|
19
|
-
|
20
|
-
end
|
20
|
+
end
|
21
21
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestMetroArea < Test::Unit::TestCase
|
4
|
+
context "Given an MetroArea from fixture" do
|
5
|
+
setup do
|
6
|
+
@metro_area = Songkickr::MetroArea.new(fixture_hash('metro_area.json')["metroArea"])
|
7
|
+
end
|
8
|
+
|
9
|
+
should "properly load data from JSON" do
|
10
|
+
assert_equal "Twin Cities", @metro_area.display_name
|
11
|
+
assert_equal 35130, @metro_area.id
|
12
|
+
assert_equal "http://www.songkick.com/metro_areas/35130-us-twin-cities?utm_source=4791&utm_medium=partner", @metro_area.uri
|
13
|
+
assert_equal "MN", @metro_area.state
|
14
|
+
assert_equal "US", @metro_area.country
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -78,7 +78,7 @@ class TestRemote < Test::Unit::TestCase
|
|
78
78
|
VCR.use_cassette('valid_artist') do
|
79
79
|
result = @remote.artist(253846)
|
80
80
|
assert_equal 253846, result.id
|
81
|
-
end
|
81
|
+
end
|
82
82
|
end
|
83
83
|
|
84
84
|
should "return the correct event for an existing event id " do
|
@@ -103,12 +103,158 @@ class TestRemote < Test::Unit::TestCase
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
should "return the correct similar artists for artist" do
|
107
|
+
VCR.use_cassette('similar_artists') do
|
108
|
+
result = @remote.similar_artists(521019)
|
109
|
+
assert_equal "Godsmack", result.results.first.display_name
|
110
|
+
end
|
111
|
+
end
|
106
112
|
|
107
|
-
|
113
|
+
should "return the correct venue calendar" do
|
114
|
+
VCR.use_cassette('venue_calendar') do
|
115
|
+
result = @remote.venue_calendar(1054)
|
116
|
+
assert_equal "Big Time Rush with Victoria Justice and Big Time Rush Premium Seats at Target Center (August 10, 2013)", result.results.first.display_name
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
should "return the correct setlists for a concert" do
|
121
|
+
VCR.use_cassette('concert_setlists') do
|
122
|
+
result = @remote.concert_setlists(786417)
|
123
|
+
assert_equal "Wilco at Troxy (25 Aug 09)", result.results.first.display_name
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
should "return the events for an artist" do
|
128
|
+
VCR.use_cassette('artist_events') do
|
129
|
+
result = @remote.artist_events(109675)
|
130
|
+
assert_equal "Senses Fail at The Zoo (August 7, 2013)", result.results.first.display_name
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
should "return the artist when searched" do
|
135
|
+
VCR.use_cassette('artist_search') do
|
136
|
+
result = @remote.artist_search('Counterparts')
|
137
|
+
assert_equal "Counterparts", result.results.first.display_name
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
should "return the event when searched" do
|
142
|
+
VCR.use_cassette('event_search') do
|
143
|
+
result = @remote.events(:artist_name => 'Counterparts')
|
144
|
+
assert_equal "Sound and Fury 2013", result.results.first.display_name
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
should "return the location when searched" do
|
149
|
+
VCR.use_cassette('location_search') do
|
150
|
+
result = @remote.location_search('St. Paul, MN')
|
151
|
+
assert_equal "St. Paul", result.results.first.city
|
152
|
+
assert_equal Songkickr::MetroArea, result.results.first.metro_area.class
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
should "return the metro area events when searched" do
|
157
|
+
VCR.use_cassette('metro_areas_events') do
|
158
|
+
result = @remote.metro_areas_events(35130)
|
159
|
+
assert_equal "Duluth Waterfront/Bayfront Festival Park 2013", result.results.first.display_name
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
should "return the venue calendar for id" do
|
164
|
+
VCR.use_cassette('venue_calendar') do
|
165
|
+
result = @remote.venue_calendar(624)
|
166
|
+
assert_equal "Mumford & Sons with The Vaccines and Bear's Den at Xcel Energy Center (September 4, 2013)", result.results.first.display_name
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
should "return the search venue" do
|
171
|
+
VCR.use_cassette('venue_search') do
|
172
|
+
result = @remote.venue_search('Xcel Energy Center')
|
173
|
+
assert_equal "Xcel Energy Center", result.results.first.display_name
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
should "return the users tracked metro areas" do
|
178
|
+
VCR.use_cassette('users_tracked_metro_areas') do
|
179
|
+
result = @remote.users_tracked_metro_areas('jrmehle')
|
180
|
+
assert_equal "Twin Cities", result.results.first.display_name
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
should "return the users metro area trackings" do
|
185
|
+
VCR.use_cassette('users_metro_area_tracking') do
|
186
|
+
result = @remote.users_metro_area_tracking('jrmehle', 35130)
|
187
|
+
assert_equal [], result.results
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
should "return the users tracked artists" do
|
192
|
+
VCR.use_cassette('users_tracked_artists') do
|
193
|
+
result = @remote.users_tracked_artists('jrmehle')
|
194
|
+
assert_equal "3 Inches of Blood", result.results.first.display_name
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
should "return the users artist tracking" do
|
199
|
+
VCR.use_cassette('users_artist_tracking') do
|
200
|
+
result = @remote.users_artist_tracking('jrmehle', 231185)
|
201
|
+
assert_equal [], result.results
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
should "return the users muted artists" do
|
206
|
+
VCR.use_cassette('users_muted_artists') do
|
207
|
+
result = @remote.users_muted_artists('jrmehle')
|
208
|
+
assert_equal "311", result.results.first.display_name
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
should "return the searched user events" do
|
213
|
+
VCR.use_cassette('users_events') do
|
214
|
+
result = @remote.users_events('michelle')
|
215
|
+
assert_equal "Wilderness festival 2013", result.results.first.display_name
|
216
|
+
end
|
217
|
+
end
|
108
218
|
|
219
|
+
should "return the users attendance" do
|
220
|
+
VCR.use_cassette('users_attendance') do
|
221
|
+
result = @remote.users_attendance('michelle', 15789464)
|
222
|
+
assert_equal "event:15789464", result.results.id
|
223
|
+
assert_equal "im_going", result.results.attendance
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
should "return the artists gigography" do
|
228
|
+
VCR.use_cassette('artists_gigography') do
|
229
|
+
result = @remote.artists_gigography(253846)
|
230
|
+
assert_equal "Radiohead at The Holly Bush Inn (July 22, 1991)", result.results.first.display_name
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
should "return the users gigography" do
|
235
|
+
VCR.use_cassette('users_gigography') do
|
236
|
+
result = @remote.users_gigography('michelle')
|
237
|
+
assert_equal "Deltron 3030 at Irving Plaza (November 6, 2000)", result.results.first.display_name
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
should "return the users tracked events calendar" do
|
242
|
+
VCR.use_cassette('users_tracked_events_calendar') do
|
243
|
+
result = @remote.users_tracked_events_calendar('jrmehle')
|
244
|
+
assert_equal 1, result.results.first.reason.count
|
245
|
+
assert_equal Songkickr::Artist, result.results.first.reason.first.class
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
should "return the users attendance calendar" do
|
250
|
+
VCR.use_cassette('users_attendance_calendar') do
|
251
|
+
result = @remote.users_attendance_calendar('jrmehle')
|
252
|
+
assert_equal "i_might_go", result.results.first.reason
|
253
|
+
end
|
254
|
+
end
|
255
|
+
end
|
109
256
|
|
110
257
|
def api_key
|
111
258
|
'hFYxiInE4DBpH5KL'
|
112
259
|
end
|
113
|
-
|
114
260
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestSetlistItem < Test::Unit::TestCase
|
4
|
+
context "Given a new SetlistItem" do
|
5
|
+
setup do
|
6
|
+
@name = 'Tour Setlist'
|
7
|
+
@setlist_item = Songkickr::SetlistItem.new({'encore' => 0, 'name' => @name})
|
8
|
+
end
|
9
|
+
|
10
|
+
should "init encore" do
|
11
|
+
assert_not_nil @setlist_item
|
12
|
+
assert !@setlist_item.encore
|
13
|
+
end
|
14
|
+
|
15
|
+
should "init name" do
|
16
|
+
assert_not_nil @setlist_item
|
17
|
+
assert_equal @name, @setlist_item.name
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/test.rb
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# This is a simple
|
2
|
+
# This is a simple command line test to make sure everything is working
|
3
3
|
|
4
4
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
5
5
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
6
6
|
require 'songkickr'
|
7
|
-
require 'httparty'
|
8
|
-
|
9
7
|
|
10
8
|
remote = Songkickr::Remote.new 'hFYxiInE4DBpH5KL'
|
11
|
-
@results = remote.artist_search(:
|
9
|
+
@results = remote.artist_search(:artist_name => "Muse", :per_page => '10').results
|
12
10
|
@results.each do |result|
|
13
11
|
print result.display_name + "\n"
|
14
12
|
end
|
15
13
|
|
16
14
|
print "\n"
|
17
15
|
|
18
|
-
@gigography_results = remote.gigography(@results[0].id, :per_page=>'50', :page=>'1', :min_date=>'2010-01-01').results
|
16
|
+
@gigography_results = remote.gigography(@results[0].id, :per_page => '50', :page => '1', :min_date => '2010-01-01').results
|
19
17
|
|
20
18
|
@gigography_results.each do |gig|
|
21
19
|
print gig.display_name + "\n"
|