songkickr 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 466c2ed9a8e1754fbcab01c5afefa84905df3e30
4
- data.tar.gz: ba7ca8300f533105846088479af33c8429f46b16
3
+ metadata.gz: 4937790e13d0ecfcd9246b55fa79433b5e7f006f
4
+ data.tar.gz: 9c072d4a67cb00839454315b9adece71e664464b
5
5
  SHA512:
6
- metadata.gz: d37cd13c4d59a4ac1ba32b0314059b61223562dc4260d98eec9538c354fa8313147e28fa86da0964dc2256219ea5656860d4ab41f24356ab5c3ff4d512320f89
7
- data.tar.gz: e269e9e30298eb0fd8075f1a59c161581585165e46f10e85904fb488b0f92c40830167cb0397679951540531627ee4bb8ba467d5bc95026e0e07793b1e6cf31e
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 = self.class.get("/artists/#{artist_id}/gigography.json", :query => query)
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 = self.class.get("/users/#{username}/gigography.json", :query => query)
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 = self.class.get("/search/artists.json", :query => { :query => query })
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 = self.class.get("/search/artists.json", :query => query.merge(:query => artist_name))
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
- result = get("/events.json", :query => query)
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
 
@@ -1,3 +1,3 @@
1
1
  module Songkickr
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end