songkickr 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +4 -2
- data/lib/songkickr/remote_api/past_events.rb +2 -2
- data/lib/songkickr/remote_api/upcoming_events.rb +8 -3
- data/lib/songkickr/version.rb +1 -1
- data/test/fixtures/vcr/event_search_hash.yml +1107 -0
- data/test/fixtures/vcr/event_search_string.yml +4765 -0
- data/test/songkickr/test_remote.rb +10 -3
- metadata +6 -4
- data/test/fixtures/vcr/event_search.yml +0 -110
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4937790e13d0ecfcd9246b55fa79433b5e7f006f
|
4
|
+
data.tar.gz: 9c072d4a67cb00839454315b9adece71e664464b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45e6b36ba9b7590c209c08d8adab48d8e9eb688c27225c9c52f38fb5b07eff392c117d07fb1be026c6abd926de4141146afcf232675e9999a90cfa3f6ff67d7d
|
7
|
+
data.tar.gz: 39d8fa2fcac3e651c7a5b7a971df53932eb6a1682ec3c4f596a60ec7233978d267ee00fde57da2e3864fdb71bdfaf5999a4ebe979f85ae29b13931c3f51cebe3
|
data/README.rdoc
CHANGED
@@ -19,9 +19,12 @@ or if your environment requires
|
|
19
19
|
|
20
20
|
Then call one of the remote methods such as events, users_events(username), or concert_setlists(event_id)
|
21
21
|
|
22
|
-
Get an artists events by name:
|
22
|
+
Get an artists events by artist name:
|
23
23
|
results = remote.events('Iron Maiden')
|
24
24
|
|
25
|
+
Get an artists events by artist name and filter to only festivals:
|
26
|
+
results = remote.events(artist_name: 'Metallica', type: 'festival')
|
27
|
+
|
25
28
|
Get a users events by username:
|
26
29
|
results = remote.users_events('jrmehle')
|
27
30
|
|
@@ -30,7 +33,6 @@ Get a the setlists of a concert by event ID:
|
|
30
33
|
|
31
34
|
*More*: As of v0.4.0 songkickr supports all of Songkick's APIs. Check the RDocs for the Songkickr::RemoteApi classes.
|
32
35
|
|
33
|
-
|
34
36
|
== Note on Patches/Pull Requests
|
35
37
|
|
36
38
|
* Fork the project.
|
@@ -13,7 +13,7 @@ module Songkickr
|
|
13
13
|
# * +page+ - Number of page
|
14
14
|
# * +order+ - 'asc' or 'desc', 'asc' by default
|
15
15
|
def artists_gigography(artist_id, query = {})
|
16
|
-
result =
|
16
|
+
result = get("/artists/#{artist_id}/gigography.json", :query => query)
|
17
17
|
Songkickr::EventResult.new result
|
18
18
|
end
|
19
19
|
|
@@ -29,7 +29,7 @@ module Songkickr
|
|
29
29
|
# * +page+ - Number of page
|
30
30
|
# * +order+ - 'asc' or 'desc', 'asc' by default
|
31
31
|
def users_gigography(username, query = {})
|
32
|
-
result =
|
32
|
+
result = get("/users/#{username}/gigography.json", :query => query)
|
33
33
|
Songkickr::EventResult.new result
|
34
34
|
end
|
35
35
|
|
@@ -41,10 +41,10 @@ module Songkickr
|
|
41
41
|
# * +per_page+ - Number of results per page, max 50.
|
42
42
|
def artist_search(query = {})
|
43
43
|
if query.is_a? String
|
44
|
-
result =
|
44
|
+
result = get("/search/artists.json", :query => { :query => query })
|
45
45
|
elsif query.is_a? Hash
|
46
46
|
artist_name = query.delete(:artist_name)
|
47
|
-
result =
|
47
|
+
result = get("/search/artists.json", :query => query.merge(:query => artist_name))
|
48
48
|
end
|
49
49
|
|
50
50
|
Songkickr::ArtistResult.new result
|
@@ -69,7 +69,12 @@ module Songkickr
|
|
69
69
|
# * +max_date+ - Most recent date for which you want to look for events
|
70
70
|
# * +location+ - See the Songkick website for instructions on how to use the location parameter http://www.songkick.com/developer/location-search
|
71
71
|
def events(query = {})
|
72
|
-
|
72
|
+
if query.is_a? String
|
73
|
+
result = get("/events.json", :query => { :artist_name => query })
|
74
|
+
elsif query.is_a? Hash
|
75
|
+
result = get("/events.json", :query => query)
|
76
|
+
end
|
77
|
+
|
73
78
|
Songkickr::EventResult.new result
|
74
79
|
end
|
75
80
|
|
data/lib/songkickr/version.rb
CHANGED