songkickr 0.5.4 → 0.5.6
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 +5 -5
- data/.ruby-version +1 -0
- data/CHANGELOG.md +62 -0
- data/Gemfile.lock +84 -63
- data/README.rdoc +16 -3
- data/Rakefile +1 -1
- data/lib/songkickr/remote.rb +1 -1
- data/lib/songkickr/remote_api/past_events.rb +2 -2
- data/lib/songkickr/remote_api/upcoming_events.rb +17 -17
- data/lib/songkickr/remote_api/user_events_and_trackings.rb +7 -7
- data/lib/songkickr/version.rb +1 -1
- data/lib/songkickr.rb +2 -0
- data/songkickr.gemspec +15 -12
- data/test/songkickr/test_artist.rb +4 -4
- data/test/songkickr/test_remote.rb +7 -7
- data/test/vcr_helper.rb +1 -1
- data/test.rb +2 -2
- metadata +72 -35
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ca7d771273725758f71175b4b8294bcfd295628ef8109ad6b42016e247ca2791
|
|
4
|
+
data.tar.gz: 1e47a04e4794a0fc359aa421d2a73da00f6303149755659e47aa685728a8e704
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da74ebb34c1e3370bcb09086ae1de4441d11074c58ecdaac8a1bcebffde3a94f1c1839a33c1edb998274685a2c8e04ff1a815b4c89d7b791f7101d0168aa94c5
|
|
7
|
+
data.tar.gz: bf252fe356dbf8a10cb084bf7cddec376a1d8b6bdcd20245548765d886e6d40e474ead0e29fbff0d873747701e2228cc43266fe3a4c064ccedaf4cda8b6a2895
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.4
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
v0.5.6 / 2026-10-24
|
|
9
|
+
===================
|
|
10
|
+
|
|
11
|
+
* Retire the project: the gem is deprecated and no longer maintained
|
|
12
|
+
* Print a deprecation warning on load
|
|
13
|
+
|
|
14
|
+
v0.5.5 / 2016-04-15
|
|
15
|
+
===================
|
|
16
|
+
|
|
17
|
+
* Internal housekeeping
|
|
18
|
+
|
|
19
|
+
v0.5.4 / 2015-12-10
|
|
20
|
+
===================
|
|
21
|
+
|
|
22
|
+
* Add support for retrieving performance billing information
|
|
23
|
+
|
|
24
|
+
v0.5.3 / 2015-09-20
|
|
25
|
+
===================
|
|
26
|
+
|
|
27
|
+
* Update dependencies to address security vulnerabilities
|
|
28
|
+
|
|
29
|
+
v0.5.2 / 2015-06-30
|
|
30
|
+
===================
|
|
31
|
+
|
|
32
|
+
* Correct parameter handling in event search queries
|
|
33
|
+
|
|
34
|
+
v0.5.1 / 2015-03-10
|
|
35
|
+
===================
|
|
36
|
+
|
|
37
|
+
* Implement support for location-based event searches
|
|
38
|
+
|
|
39
|
+
v0.5.0 / 2014-11-25
|
|
40
|
+
===================
|
|
41
|
+
|
|
42
|
+
* Refactor codebase for improved maintainability and performance
|
|
43
|
+
|
|
44
|
+
v0.4.0 / 2014-07-15
|
|
45
|
+
===================
|
|
46
|
+
|
|
47
|
+
* Add support for additional Songkick API endpoints
|
|
48
|
+
|
|
49
|
+
v0.3.0 / 2014-03-10
|
|
50
|
+
===================
|
|
51
|
+
|
|
52
|
+
* Improve error handling and response parsing
|
|
53
|
+
|
|
54
|
+
v0.2.0 / 2013-11-05
|
|
55
|
+
===================
|
|
56
|
+
|
|
57
|
+
* Introduce support for artist and venue search functionalities
|
|
58
|
+
|
|
59
|
+
v0.1.0 / 2013-07-01
|
|
60
|
+
===================
|
|
61
|
+
|
|
62
|
+
* Initial release
|
data/Gemfile.lock
CHANGED
|
@@ -1,77 +1,98 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
songkickr (0.5.
|
|
5
|
-
httparty (>= 0.
|
|
4
|
+
songkickr (0.5.6)
|
|
5
|
+
httparty (~> 0.23, >= 0.23.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activesupport (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
activesupport (8.0.2)
|
|
11
|
+
base64
|
|
12
|
+
benchmark (>= 0.3)
|
|
13
|
+
bigdecimal
|
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
|
+
connection_pool (>= 2.2.5)
|
|
16
|
+
drb
|
|
17
|
+
i18n (>= 1.6, < 2)
|
|
18
|
+
logger (>= 1.4.2)
|
|
19
|
+
minitest (>= 5.1)
|
|
20
|
+
securerandom (>= 0.3)
|
|
21
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
22
|
+
uri (>= 0.13.1)
|
|
23
|
+
addressable (2.8.7)
|
|
24
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
25
|
+
base64 (0.3.0)
|
|
26
|
+
benchmark (0.4.1)
|
|
27
|
+
bigdecimal (3.2.2)
|
|
28
|
+
coderay (1.1.3)
|
|
29
|
+
concurrent-ruby (1.3.5)
|
|
30
|
+
connection_pool (2.5.3)
|
|
31
|
+
crack (1.0.0)
|
|
32
|
+
bigdecimal
|
|
33
|
+
rexml
|
|
34
|
+
csv (3.3.5)
|
|
35
|
+
date (3.4.1)
|
|
36
|
+
drb (2.2.3)
|
|
37
|
+
erb (5.0.1)
|
|
38
|
+
hashdiff (1.2.0)
|
|
39
|
+
httparty (0.23.1)
|
|
40
|
+
csv
|
|
41
|
+
mini_mime (>= 1.0.0)
|
|
23
42
|
multi_xml (>= 0.5.2)
|
|
24
|
-
i18n (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
method_source (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
shoulda-
|
|
47
|
-
|
|
48
|
-
shoulda-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
addressable (>= 2.2.7)
|
|
62
|
-
crack (>= 0.1.7)
|
|
43
|
+
i18n (1.14.7)
|
|
44
|
+
concurrent-ruby (~> 1.0)
|
|
45
|
+
logger (1.7.0)
|
|
46
|
+
method_source (1.1.0)
|
|
47
|
+
mini_mime (1.1.5)
|
|
48
|
+
minitest (5.25.5)
|
|
49
|
+
multi_xml (0.7.2)
|
|
50
|
+
bigdecimal (~> 3.1)
|
|
51
|
+
pry (0.15.2)
|
|
52
|
+
coderay (~> 1.1)
|
|
53
|
+
method_source (~> 1.0)
|
|
54
|
+
psych (5.2.6)
|
|
55
|
+
date
|
|
56
|
+
stringio
|
|
57
|
+
public_suffix (6.0.2)
|
|
58
|
+
rake (13.3.0)
|
|
59
|
+
rdoc (6.14.0)
|
|
60
|
+
erb
|
|
61
|
+
psych (>= 4.0.0)
|
|
62
|
+
rexml (3.4.1)
|
|
63
|
+
securerandom (0.4.1)
|
|
64
|
+
shoulda (4.0.0)
|
|
65
|
+
shoulda-context (~> 2.0)
|
|
66
|
+
shoulda-matchers (~> 4.0)
|
|
67
|
+
shoulda-context (2.0.0)
|
|
68
|
+
shoulda-matchers (4.5.1)
|
|
69
|
+
activesupport (>= 4.2.0)
|
|
70
|
+
stringio (3.1.7)
|
|
71
|
+
tzinfo (2.0.6)
|
|
72
|
+
concurrent-ruby (~> 1.0)
|
|
73
|
+
uri (1.0.3)
|
|
74
|
+
vcr (6.3.1)
|
|
75
|
+
base64
|
|
76
|
+
webmock (3.25.1)
|
|
77
|
+
addressable (>= 2.8.0)
|
|
78
|
+
crack (>= 0.3.2)
|
|
79
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
|
63
80
|
|
|
64
81
|
PLATFORMS
|
|
65
|
-
|
|
82
|
+
arm64-darwin-24
|
|
66
83
|
ruby
|
|
84
|
+
x86_64-linux
|
|
67
85
|
|
|
68
86
|
DEPENDENCIES
|
|
69
|
-
crack
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
87
|
+
crack (~> 1.0, >= 1.0.0)
|
|
88
|
+
minitest (~> 5.25, >= 5.25.5)
|
|
89
|
+
pry (~> 0.15.2)
|
|
90
|
+
rake (~> 13.3, >= 13.3.0)
|
|
91
|
+
rdoc (~> 6.14)
|
|
92
|
+
shoulda (~> 4.0)
|
|
74
93
|
songkickr!
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
94
|
+
vcr (~> 6.3, >= 6.3.1)
|
|
95
|
+
webmock (~> 3.25, >= 3.25.1)
|
|
96
|
+
|
|
97
|
+
BUNDLED WITH
|
|
98
|
+
2.6.9
|
data/README.rdoc
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
= songkickr
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
*This project is retired and no longer maintained.*
|
|
4
|
+
|
|
5
|
+
Songkick was acquired by Suno and its API is no longer open. Songkick now says it is not approving API requests for student, educational, or hobbyist projects, and charges $500 per month for access. I no longer want to build on a platform that does not offer open access to its data, so I have stopped development of this gem. Existing releases will stay on RubyGems, but there will be no further updates. Feel free to fork it.
|
|
4
6
|
|
|
5
7
|
A Ruby wrapper around the Songkick API. Visit www.songkick.com/developer for documentation on the Songkick API.
|
|
6
8
|
|
|
@@ -31,6 +33,10 @@ Get a users events by username:
|
|
|
31
33
|
Get a the setlists of a concert by event ID:
|
|
32
34
|
results = remote.concert_setlists(2680726)
|
|
33
35
|
|
|
36
|
+
Use SSL so that your API key is not sent in the clear:
|
|
37
|
+
|
|
38
|
+
Songkickr::Remote.base_uri 'https://api.songkick.com/api/3.0'
|
|
39
|
+
|
|
34
40
|
*More*: As of v0.4.0 songkickr supports all of Songkick's APIs. Check the RDocs for the Songkickr::RemoteApi classes.
|
|
35
41
|
|
|
36
42
|
== Note on Patches/Pull Requests
|
|
@@ -43,13 +49,20 @@ Get a the setlists of a concert by event ID:
|
|
|
43
49
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
|
44
50
|
* Send me a pull request against the *develop* branch.
|
|
45
51
|
|
|
52
|
+
== Releasing a new version
|
|
53
|
+
|
|
54
|
+
1. Update the changelog with the new release information (`git changelog --tag <version> && cat CHANGELOG.md`)
|
|
55
|
+
2. Build the new release locally for testing (`gem build songkickr.gemspec`)
|
|
56
|
+
3. Tag the release (`git tag <version>`) -- version should follow semantic versioning (ex. v0.1.1)
|
|
57
|
+
4. Publish the release to RubyGems (`gem signin && gem push songkickr-0.0.0.gem`)
|
|
58
|
+
|
|
46
59
|
== Copyright
|
|
47
60
|
|
|
48
|
-
Copyright (c) 2010-
|
|
61
|
+
Copyright (c) 2010-2025 Jared Mehle. See LICENSE for details.
|
|
49
62
|
|
|
50
63
|
== Contributors
|
|
51
64
|
|
|
52
|
-
Thanks to Andrew Chen, Akshay Dodeja, Tomasz Stachewicz, Dave Knapik, Matt Ruzicka,
|
|
65
|
+
Thanks to Andrew Chen, Akshay Dodeja, Tomasz Stachewicz, Dave Knapik, Matt Ruzicka, Alex Beregszaszi, and Github user bibliotechy for submitting code and pull requests.
|
|
53
66
|
|
|
54
67
|
A special thank you to Jon Nunemaker for httparty which is used extensively within this
|
|
55
68
|
gem and for the twitter gem as inspiration.
|
data/Rakefile
CHANGED
data/lib/songkickr/remote.rb
CHANGED
|
@@ -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 = get("/artists/#{artist_id}/gigography.json", :
|
|
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 = get("/users/#{username}/gigography.json", :
|
|
32
|
+
result = get("/users/#{username}/gigography.json", query: query)
|
|
33
33
|
Songkickr::EventResult.new result
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -4,7 +4,7 @@ module Songkickr
|
|
|
4
4
|
# ==== Artist calendar (Upcoming)
|
|
5
5
|
# Returns an array of Events.
|
|
6
6
|
#
|
|
7
|
-
# ex. remote.artist_events('mbid:5bac9b4f-2f1c-4d39-8d11-231d5b6650ce', :
|
|
7
|
+
# ex. remote.artist_events('mbid:5bac9b4f-2f1c-4d39-8d11-231d5b6650ce', page: 1, per_page: 5, order: 'desc')
|
|
8
8
|
#
|
|
9
9
|
# http://www.songkick.com/developer/upcoming-events-for-artist
|
|
10
10
|
#
|
|
@@ -23,7 +23,7 @@ module Songkickr
|
|
|
23
23
|
url = "/artists/#{artist_id_or_music_brainz_id}/calendar.json"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
result = get(url, :
|
|
26
|
+
result = get(url, query: query)
|
|
27
27
|
Songkickr::EventResult.new result
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -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 = get("/search/artists.json", :
|
|
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 = get("/search/artists.json", :
|
|
47
|
+
result = get("/search/artists.json", query: query.merge(query: artist_name))
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
Songkickr::ArtistResult.new result
|
|
@@ -56,7 +56,7 @@ module Songkickr
|
|
|
56
56
|
# === Parameters
|
|
57
57
|
# * +query+ - A hash of query parameters, see below for options.
|
|
58
58
|
#
|
|
59
|
-
# _Example:_ <code>{ :
|
|
59
|
+
# _Example:_ <code>{ type: 'concert', artists: 'Coolio' }</code>
|
|
60
60
|
#
|
|
61
61
|
# ==== Query Parameters
|
|
62
62
|
# * +type+ - valid types: concert or festival
|
|
@@ -70,9 +70,9 @@ module Songkickr
|
|
|
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", :
|
|
73
|
+
result = get("/events.json", query: { artist_name: query })
|
|
74
74
|
elsif query.is_a? Hash
|
|
75
|
-
result = get("/events.json", :
|
|
75
|
+
result = get("/events.json", query: query)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
Songkickr::EventResult.new result
|
|
@@ -86,12 +86,12 @@ module Songkickr
|
|
|
86
86
|
#
|
|
87
87
|
# ==== Query Parameters
|
|
88
88
|
# * +name+ - Metro area or city named 'location_name' string <em>Ex. 'Minneapolis', 'Nashville', or 'London'</em>.
|
|
89
|
-
# * +location+ - 'geo:
|
|
90
|
-
# * +ip+ - 'ip:
|
|
89
|
+
# * +location+ - 'geo:lat,lng' string <em>Ex. 'geo:-0.128,51.5078'</em>
|
|
90
|
+
# * +ip+ - 'ip:ip-addr' string <em>Ex. 'ip:123.123.123.123'</em>
|
|
91
91
|
# * +page+ - Page number
|
|
92
92
|
# * +per_page+ - Number of results per page, max 50.
|
|
93
93
|
def location_search(query = {})
|
|
94
|
-
result = get("/search/locations.json", :
|
|
94
|
+
result = get("/search/locations.json", query: query)
|
|
95
95
|
Songkickr::LocationResult.new result
|
|
96
96
|
end
|
|
97
97
|
|
|
@@ -102,7 +102,7 @@ module Songkickr
|
|
|
102
102
|
# * +longitude+ - float <em>Ex. -19.35</em>
|
|
103
103
|
# * +options+ - hash of additional options such as page and per_page
|
|
104
104
|
def location_search_geo(latitude, longitude, options = {})
|
|
105
|
-
location_search(options.merge(:
|
|
105
|
+
location_search(options.merge(location: "geo:#{latitude},#{longitude}"))
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# Location Search by IP address
|
|
@@ -110,8 +110,8 @@ module Songkickr
|
|
|
110
110
|
# === Parameters
|
|
111
111
|
# * +ip_address+ string <em>Ex. '123.123.123.123'</em>
|
|
112
112
|
# * +options+ - hash of additional options such as page and per_page
|
|
113
|
-
def location_search_ip(ip_address, options)
|
|
114
|
-
location_search(options.merge(:
|
|
113
|
+
def location_search_ip(ip_address, options = {})
|
|
114
|
+
location_search(options.merge(location: "ip:#{ip_address}"))
|
|
115
115
|
end
|
|
116
116
|
|
|
117
117
|
# Location Search by metro area name
|
|
@@ -119,8 +119,8 @@ module Songkickr
|
|
|
119
119
|
# === Parameters
|
|
120
120
|
# * +metro_area_name+ - Metro area or city named 'location_name' string <em>Ex. 'Minneapolis', 'Nashville', or 'London'</em>.
|
|
121
121
|
# * +options+ - hash of additional options such as page and per_page
|
|
122
|
-
def location_search_metro_area_name(metro_area_name)
|
|
123
|
-
location_search(options.merge(:
|
|
122
|
+
def location_search_metro_area_name(metro_area_name, options = {})
|
|
123
|
+
location_search(options.merge(query: metro_area_name))
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
# ==== Metro Area Events (Upcoming)
|
|
@@ -136,7 +136,7 @@ module Songkickr
|
|
|
136
136
|
# * +page+ - Page number
|
|
137
137
|
# * +per_page+ - Number of results per page, max 50.
|
|
138
138
|
def metro_areas_events(metro_area_id, query = {})
|
|
139
|
-
result = get("/metro_areas/#{metro_area_id}/calendar.json", :
|
|
139
|
+
result = get("/metro_areas/#{metro_area_id}/calendar.json", query: query)
|
|
140
140
|
Songkickr::EventResult.new result
|
|
141
141
|
end
|
|
142
142
|
|
|
@@ -163,7 +163,7 @@ module Songkickr
|
|
|
163
163
|
# * +page+ - Page number
|
|
164
164
|
# * +per_page+ - Number of results per page, max 50.
|
|
165
165
|
def venue_search(query)
|
|
166
|
-
result = get("/search/venues.json", :
|
|
166
|
+
result = get("/search/venues.json", query: query)
|
|
167
167
|
Songkickr::VenueResult.new result
|
|
168
168
|
end
|
|
169
169
|
end
|
|
@@ -13,7 +13,7 @@ module Songkickr
|
|
|
13
13
|
# * +page+ - Page number
|
|
14
14
|
# * +per_page+ - Number of results per page, max 50.
|
|
15
15
|
def users_tracked_events_calendar(username, query = {})
|
|
16
|
-
result = get("/users/#{username}/calendar.json?reason=tracked_artist", :
|
|
16
|
+
result = get("/users/#{username}/calendar.json?reason=tracked_artist", query: query)
|
|
17
17
|
Songkickr::CalendarResult.new result
|
|
18
18
|
end
|
|
19
19
|
|
|
@@ -29,7 +29,7 @@ module Songkickr
|
|
|
29
29
|
# * +page+ - Page number
|
|
30
30
|
# * +per_page+ - Number of results per page, max 50.
|
|
31
31
|
def users_attendance_calendar(username, query = {})
|
|
32
|
-
result = get("/users/#{username}/calendar.json?reason=attendance", :
|
|
32
|
+
result = get("/users/#{username}/calendar.json?reason=attendance", query: query)
|
|
33
33
|
Songkickr::CalendarResult.new result
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -45,7 +45,7 @@ module Songkickr
|
|
|
45
45
|
# * +page+ - Page number
|
|
46
46
|
# * +per_page+ - Number of results per page, max 50.
|
|
47
47
|
def users_tracked_metro_areas(username, query = {})
|
|
48
|
-
result = get("/users/#{username}/metro_areas/tracked.json", :
|
|
48
|
+
result = get("/users/#{username}/metro_areas/tracked.json", query: query)
|
|
49
49
|
Songkickr::MetroAreaResult.new result
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -57,7 +57,7 @@ module Songkickr
|
|
|
57
57
|
# * +metro_area_id+ - A Songkick metro area ID.
|
|
58
58
|
# * +query+ - A hash of query parameters, see below for options.
|
|
59
59
|
def users_metro_area_tracking(username, metro_area_id, query = {})
|
|
60
|
-
result = get("/users/#{username}/trackings/metro_area:#{metro_area_id}.json", :
|
|
60
|
+
result = get("/users/#{username}/trackings/metro_area:#{metro_area_id}.json", query: query)
|
|
61
61
|
Songkickr::MetroAreaResult.new result
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -72,7 +72,7 @@ module Songkickr
|
|
|
72
72
|
# * +page+ - Page number
|
|
73
73
|
# * +per_page+ - Number of results per page, max 50.
|
|
74
74
|
def users_tracked_artists(username, query = {})
|
|
75
|
-
result = get("/users/#{username}/artists/tracked.json", :
|
|
75
|
+
result = get("/users/#{username}/artists/tracked.json", query: query)
|
|
76
76
|
Songkickr::ArtistResult.new result
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -98,7 +98,7 @@ module Songkickr
|
|
|
98
98
|
# * +page+ - Page number
|
|
99
99
|
# * +per_page+ - Number of results per page, max 50.
|
|
100
100
|
def users_muted_artists(username, query = {})
|
|
101
|
-
result = get("/users/#{username}/artists/muted.json", :
|
|
101
|
+
result = get("/users/#{username}/artists/muted.json", query: query)
|
|
102
102
|
Songkickr::ArtistResult.new result
|
|
103
103
|
end
|
|
104
104
|
|
|
@@ -124,7 +124,7 @@ module Songkickr
|
|
|
124
124
|
# * +order+ - 'asc' or 'desc', 'asc' by default
|
|
125
125
|
# * +created_after+ - timestamp using ISO8601 format, e.g. 2012-02-29T13:37:00Z
|
|
126
126
|
def users_events(username, query = {})
|
|
127
|
-
result = get("/users/#{username}/events.json", :
|
|
127
|
+
result = get("/users/#{username}/events.json", query: query)
|
|
128
128
|
Songkickr::EventResult.new result
|
|
129
129
|
end
|
|
130
130
|
|
data/lib/songkickr/version.rb
CHANGED
data/lib/songkickr.rb
CHANGED
data/songkickr.gemspec
CHANGED
|
@@ -8,20 +8,22 @@ Gem::Specification.new do |gem|
|
|
|
8
8
|
gem.version = Songkickr::VERSION
|
|
9
9
|
gem.authors = ["Jared Mehle"]
|
|
10
10
|
gem.email = ["jrmehle@gmail.com"]
|
|
11
|
-
gem.description = "
|
|
12
|
-
gem.summary = "A Ruby wrapper around the Songkick API."
|
|
11
|
+
gem.description = "DEPRECATED: This gem is no longer maintained. Songkick closed its API to hobbyists after its acquisition by Suno."
|
|
12
|
+
gem.summary = "DEPRECATED: A Ruby wrapper around the Songkick API."
|
|
13
13
|
gem.homepage = "http://github.com/jrmehle/songkickr"
|
|
14
14
|
|
|
15
|
-
gem.
|
|
16
|
-
gem.add_development_dependency 'webmock', "~> 1.8.0"
|
|
17
|
-
gem.add_development_dependency 'rdoc', "~> 4.1.0"
|
|
18
|
-
gem.add_development_dependency 'crack', ">= 0"
|
|
19
|
-
gem.add_development_dependency 'rake', "~> 10.3.0"
|
|
20
|
-
gem.add_development_dependency 'test-unit', "~> 3.0.0"
|
|
21
|
-
gem.add_development_dependency 'vcr', "~> 2.9.0"
|
|
22
|
-
gem.add_development_dependency 'pry', ">= 0"
|
|
15
|
+
gem.required_ruby_version = '>= 2.7.0', '< 4.0.0'
|
|
23
16
|
|
|
24
|
-
gem.
|
|
17
|
+
gem.add_development_dependency 'shoulda', '~> 4.0'
|
|
18
|
+
gem.add_development_dependency 'webmock', '~> 3.25', '>= 3.25.1'
|
|
19
|
+
gem.add_development_dependency 'rdoc', '~> 6.14'
|
|
20
|
+
gem.add_development_dependency 'crack', "~> 1.0", ">= 1.0.0"
|
|
21
|
+
gem.add_development_dependency 'rake', "~> 13.3", ">= 13.3.0"
|
|
22
|
+
gem.add_development_dependency 'minitest', '~> 5.25', '>= 5.25.5'
|
|
23
|
+
gem.add_development_dependency 'vcr', '~> 6.3', '>= 6.3.1'
|
|
24
|
+
gem.add_development_dependency 'pry', '~> 0.15.2'
|
|
25
|
+
|
|
26
|
+
gem.add_runtime_dependency 'httparty', "~> 0.23", ">= 0.23.1"
|
|
25
27
|
|
|
26
28
|
gem.files = `git ls-files`.split($/)
|
|
27
29
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
@@ -29,7 +31,8 @@ Gem::Specification.new do |gem|
|
|
|
29
31
|
gem.require_paths = ["lib"]
|
|
30
32
|
|
|
31
33
|
gem.extra_rdoc_files = [
|
|
34
|
+
"CHANGELOG.md",
|
|
32
35
|
"LICENSE",
|
|
33
|
-
"README.rdoc"
|
|
36
|
+
"README.rdoc",
|
|
34
37
|
]
|
|
35
38
|
end
|
|
@@ -3,19 +3,19 @@ require 'helper'
|
|
|
3
3
|
class TestArtist < Test::Unit::TestCase
|
|
4
4
|
context "Given a new Artist" do
|
|
5
5
|
setup do
|
|
6
|
-
@uri
|
|
6
|
+
@uri = 'http://jrmehle.com/'
|
|
7
7
|
@display_name = 'Artist Name'
|
|
8
|
-
@artist
|
|
8
|
+
@artist = Songkickr::Artist.new({'uri' => @uri, 'displayName' => @display_name})
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
should "init uri" do
|
|
12
12
|
assert_not_nil @artist
|
|
13
13
|
assert_equal @uri, @artist.uri
|
|
14
14
|
end
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
should "init display_name" do
|
|
17
17
|
assert_not_nil @artist
|
|
18
18
|
assert_equal @display_name, @artist.display_name
|
|
19
19
|
end
|
|
20
|
-
end
|
|
20
|
+
end
|
|
21
21
|
end
|
|
@@ -140,14 +140,14 @@ class TestRemote < Test::Unit::TestCase
|
|
|
140
140
|
|
|
141
141
|
should "return the artist with paged results when searched as a hash" do
|
|
142
142
|
VCR.use_cassette('paged_artist_search') do
|
|
143
|
-
result = @remote.artist_search(:
|
|
143
|
+
result = @remote.artist_search(artist_name: 'Counterparts', per_page: 2)
|
|
144
144
|
assert_equal 2, result.results.size
|
|
145
145
|
end
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
should "return the artist when searched as a hash" do
|
|
149
149
|
VCR.use_cassette('artist_search_hash') do
|
|
150
|
-
result = @remote.artist_search(:
|
|
150
|
+
result = @remote.artist_search(artist_name: 'Counterparts')
|
|
151
151
|
assert_equal "Counterparts", result.results.first.display_name
|
|
152
152
|
end
|
|
153
153
|
end
|
|
@@ -161,14 +161,14 @@ class TestRemote < Test::Unit::TestCase
|
|
|
161
161
|
|
|
162
162
|
should "return the event when searched as a hash" do
|
|
163
163
|
VCR.use_cassette('event_search_hash') do
|
|
164
|
-
result = @remote.events(:
|
|
164
|
+
result = @remote.events(artist_name: 'Counterparts')
|
|
165
165
|
assert_equal "Amnesia Rockfest 2014", result.results.first.display_name
|
|
166
166
|
end
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
should "return the location when searched" do
|
|
170
170
|
VCR.use_cassette('location_search') do
|
|
171
|
-
result = @remote.location_search(:
|
|
171
|
+
result = @remote.location_search(query: 'St. Paul, MN')
|
|
172
172
|
assert_equal "St. Paul", result.results.first.city
|
|
173
173
|
assert_equal Songkickr::MetroArea, result.results.first.metro_area.class
|
|
174
174
|
end
|
|
@@ -176,7 +176,7 @@ class TestRemote < Test::Unit::TestCase
|
|
|
176
176
|
|
|
177
177
|
should "return the locations when searched with pagination" do
|
|
178
178
|
VCR.use_cassette('location_search_paged') do
|
|
179
|
-
result = @remote.location_search(:
|
|
179
|
+
result = @remote.location_search(query: 'St. Paul, MN', per_page: 2)
|
|
180
180
|
assert_equal "St. Paul", result.results.first.city
|
|
181
181
|
assert_equal Songkickr::MetroArea, result.results.first.metro_area.class
|
|
182
182
|
assert_equal 2, result.results.size
|
|
@@ -207,14 +207,14 @@ class TestRemote < Test::Unit::TestCase
|
|
|
207
207
|
|
|
208
208
|
should "return the search venue" do
|
|
209
209
|
VCR.use_cassette('venue_search') do
|
|
210
|
-
result = @remote.venue_search(:
|
|
210
|
+
result = @remote.venue_search(query: 'Xcel Energy Center')
|
|
211
211
|
assert_equal "Xcel Energy Center", result.results.first.display_name
|
|
212
212
|
end
|
|
213
213
|
end
|
|
214
214
|
|
|
215
215
|
should "return the searched venue with paged results" do
|
|
216
216
|
VCR.use_cassette('venue_search_paged') do
|
|
217
|
-
result = @remote.venue_search(:
|
|
217
|
+
result = @remote.venue_search(query: 'Xcel Energy Center', per_page: 2)
|
|
218
218
|
assert_equal "Xcel Energy Center", result.results.first.display_name
|
|
219
219
|
assert_equal 2, result.results.size
|
|
220
220
|
end
|
data/test/vcr_helper.rb
CHANGED
data/test.rb
CHANGED
|
@@ -6,14 +6,14 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
|
6
6
|
require 'songkickr'
|
|
7
7
|
|
|
8
8
|
remote = Songkickr::Remote.new 'hFYxiInE4DBpH5KL'
|
|
9
|
-
@results = remote.artist_search(:
|
|
9
|
+
@results = remote.artist_search(artist_name: "Muse", per_page: '10').results
|
|
10
10
|
@results.each do |result|
|
|
11
11
|
print result.display_name + "\n"
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
print "\n"
|
|
15
15
|
|
|
16
|
-
@gigography_results = remote.gigography(@results[0].id, :
|
|
16
|
+
@gigography_results = remote.gigography(@results[0].id, per_page: '50', page: '1', min_date: '2010-01-01').results
|
|
17
17
|
|
|
18
18
|
@gigography_results.each do |gig|
|
|
19
19
|
print gig.display_name + "\n"
|
metadata
CHANGED
|
@@ -1,155 +1,192 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: songkickr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jared Mehle
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: shoulda
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: '4.0'
|
|
20
19
|
type: :development
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: '4.0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: webmock
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
32
|
+
version: '3.25'
|
|
33
|
+
- - ">="
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: 3.25.1
|
|
34
36
|
type: :development
|
|
35
37
|
prerelease: false
|
|
36
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
39
|
requirements:
|
|
38
40
|
- - "~>"
|
|
39
41
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
42
|
+
version: '3.25'
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 3.25.1
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
|
42
47
|
name: rdoc
|
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
|
44
49
|
requirements:
|
|
45
50
|
- - "~>"
|
|
46
51
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
52
|
+
version: '6.14'
|
|
48
53
|
type: :development
|
|
49
54
|
prerelease: false
|
|
50
55
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
56
|
requirements:
|
|
52
57
|
- - "~>"
|
|
53
58
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
59
|
+
version: '6.14'
|
|
55
60
|
- !ruby/object:Gem::Dependency
|
|
56
61
|
name: crack
|
|
57
62
|
requirement: !ruby/object:Gem::Requirement
|
|
58
63
|
requirements:
|
|
64
|
+
- - "~>"
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '1.0'
|
|
59
67
|
- - ">="
|
|
60
68
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
69
|
+
version: 1.0.0
|
|
62
70
|
type: :development
|
|
63
71
|
prerelease: false
|
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
73
|
requirements:
|
|
74
|
+
- - "~>"
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
version: '1.0'
|
|
66
77
|
- - ">="
|
|
67
78
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
79
|
+
version: 1.0.0
|
|
69
80
|
- !ruby/object:Gem::Dependency
|
|
70
81
|
name: rake
|
|
71
82
|
requirement: !ruby/object:Gem::Requirement
|
|
72
83
|
requirements:
|
|
73
84
|
- - "~>"
|
|
74
85
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
86
|
+
version: '13.3'
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: 13.3.0
|
|
76
90
|
type: :development
|
|
77
91
|
prerelease: false
|
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
93
|
requirements:
|
|
80
94
|
- - "~>"
|
|
81
95
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
96
|
+
version: '13.3'
|
|
97
|
+
- - ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: 13.3.0
|
|
83
100
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
101
|
+
name: minitest
|
|
85
102
|
requirement: !ruby/object:Gem::Requirement
|
|
86
103
|
requirements:
|
|
87
104
|
- - "~>"
|
|
88
105
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
106
|
+
version: '5.25'
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: 5.25.5
|
|
90
110
|
type: :development
|
|
91
111
|
prerelease: false
|
|
92
112
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
113
|
requirements:
|
|
94
114
|
- - "~>"
|
|
95
115
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
116
|
+
version: '5.25'
|
|
117
|
+
- - ">="
|
|
118
|
+
- !ruby/object:Gem::Version
|
|
119
|
+
version: 5.25.5
|
|
97
120
|
- !ruby/object:Gem::Dependency
|
|
98
121
|
name: vcr
|
|
99
122
|
requirement: !ruby/object:Gem::Requirement
|
|
100
123
|
requirements:
|
|
101
124
|
- - "~>"
|
|
102
125
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
126
|
+
version: '6.3'
|
|
127
|
+
- - ">="
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: 6.3.1
|
|
104
130
|
type: :development
|
|
105
131
|
prerelease: false
|
|
106
132
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
133
|
requirements:
|
|
108
134
|
- - "~>"
|
|
109
135
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
136
|
+
version: '6.3'
|
|
137
|
+
- - ">="
|
|
138
|
+
- !ruby/object:Gem::Version
|
|
139
|
+
version: 6.3.1
|
|
111
140
|
- !ruby/object:Gem::Dependency
|
|
112
141
|
name: pry
|
|
113
142
|
requirement: !ruby/object:Gem::Requirement
|
|
114
143
|
requirements:
|
|
115
|
-
- - "
|
|
144
|
+
- - "~>"
|
|
116
145
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
146
|
+
version: 0.15.2
|
|
118
147
|
type: :development
|
|
119
148
|
prerelease: false
|
|
120
149
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
150
|
requirements:
|
|
122
|
-
- - "
|
|
151
|
+
- - "~>"
|
|
123
152
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
153
|
+
version: 0.15.2
|
|
125
154
|
- !ruby/object:Gem::Dependency
|
|
126
155
|
name: httparty
|
|
127
156
|
requirement: !ruby/object:Gem::Requirement
|
|
128
157
|
requirements:
|
|
158
|
+
- - "~>"
|
|
159
|
+
- !ruby/object:Gem::Version
|
|
160
|
+
version: '0.23'
|
|
129
161
|
- - ">="
|
|
130
162
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 0.
|
|
163
|
+
version: 0.23.1
|
|
132
164
|
type: :runtime
|
|
133
165
|
prerelease: false
|
|
134
166
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
167
|
requirements:
|
|
168
|
+
- - "~>"
|
|
169
|
+
- !ruby/object:Gem::Version
|
|
170
|
+
version: '0.23'
|
|
136
171
|
- - ">="
|
|
137
172
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 0.
|
|
139
|
-
description: '
|
|
140
|
-
|
|
173
|
+
version: 0.23.1
|
|
174
|
+
description: 'DEPRECATED: This gem is no longer maintained. Songkick closed its API
|
|
175
|
+
to hobbyists after its acquisition by Suno.'
|
|
141
176
|
email:
|
|
142
177
|
- jrmehle@gmail.com
|
|
143
178
|
executables: []
|
|
144
179
|
extensions: []
|
|
145
180
|
extra_rdoc_files:
|
|
181
|
+
- CHANGELOG.md
|
|
146
182
|
- LICENSE
|
|
147
183
|
- README.rdoc
|
|
148
184
|
files:
|
|
149
185
|
- ".bundle/config"
|
|
150
186
|
- ".document"
|
|
151
187
|
- ".gitignore"
|
|
152
|
-
- ".
|
|
188
|
+
- ".ruby-version"
|
|
189
|
+
- CHANGELOG.md
|
|
153
190
|
- Gemfile
|
|
154
191
|
- Gemfile.lock
|
|
155
192
|
- LICENSE
|
|
@@ -244,7 +281,6 @@ files:
|
|
|
244
281
|
homepage: http://github.com/jrmehle/songkickr
|
|
245
282
|
licenses: []
|
|
246
283
|
metadata: {}
|
|
247
|
-
post_install_message:
|
|
248
284
|
rdoc_options: []
|
|
249
285
|
require_paths:
|
|
250
286
|
- lib
|
|
@@ -252,18 +288,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
252
288
|
requirements:
|
|
253
289
|
- - ">="
|
|
254
290
|
- !ruby/object:Gem::Version
|
|
255
|
-
version:
|
|
291
|
+
version: 2.7.0
|
|
292
|
+
- - "<"
|
|
293
|
+
- !ruby/object:Gem::Version
|
|
294
|
+
version: 4.0.0
|
|
256
295
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
296
|
requirements:
|
|
258
297
|
- - ">="
|
|
259
298
|
- !ruby/object:Gem::Version
|
|
260
299
|
version: '0'
|
|
261
300
|
requirements: []
|
|
262
|
-
|
|
263
|
-
rubygems_version: 2.4.2
|
|
264
|
-
signing_key:
|
|
301
|
+
rubygems_version: 3.6.9
|
|
265
302
|
specification_version: 4
|
|
266
|
-
summary: A Ruby wrapper around the Songkick API.
|
|
303
|
+
summary: 'DEPRECATED: A Ruby wrapper around the Songkick API.'
|
|
267
304
|
test_files:
|
|
268
305
|
- test/fixtures/event_7391451.json
|
|
269
306
|
- test/fixtures/events.json
|