echowrap 0.1.0 → 0.1.1
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 +7 -0
- data/README.md +8 -0
- data/echowrap.gemspec +1 -1
- data/examples/echowrap_examples.rb +395 -0
- data/lib/echowrap/version.rb +1 -1
- metadata +10 -17
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 788bd27b6b2046898456e19218694052ade712a7
|
4
|
+
data.tar.gz: e813c4e8d7626cb0144a20bb6de2b2fefca0e339
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1eeca991459d386db4b0d6616795fde13a30c72d1f8e71a47d76a05c7f89a5d658d19eae43bef06ebd6df711e30f5fd1c4fddd512bf3f50b7b3bd18030d69e7f
|
7
|
+
data.tar.gz: 050df1d7be4d74527f3e05e0bc247e531fc0e31cfaea819e3df282e2442cdab1480abbfd01464722d58338dc01e1fb8d33e5d0fe57c564e014cb15570ec059b5
|
data/README.md
CHANGED
@@ -61,6 +61,14 @@ Echowrap.configure do |config|
|
|
61
61
|
config.shared_secret = 'YOUR_SHARED_SECRET'
|
62
62
|
end
|
63
63
|
```
|
64
|
+
If you are using Echowrap with a Rails application then a good location
|
65
|
+
for the key would be to create an initializer, for example you could
|
66
|
+
place the above code in /config/initializers/echowrap.rb.
|
67
|
+
|
68
|
+
You can also use Echowrap in any plain old ruby file and I've included
|
69
|
+
an example of this
|
70
|
+
[here](https://github.com/timcase/echowrap/blob/master/examples/echowrap_examples.rb)
|
71
|
+
|
64
72
|
You are ready to use Echowrap:
|
65
73
|
|
66
74
|
```ruby
|
data/echowrap.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
|
-
gem.add_dependency 'faraday', '~> 0.9.0
|
21
|
+
gem.add_dependency 'faraday', '~> 0.9.0'
|
22
22
|
gem.add_dependency 'multi_json', '~> 1.8.0'
|
23
23
|
gem.add_dependency 'simple_oauth', '~> 0.2'
|
24
24
|
|
@@ -0,0 +1,395 @@
|
|
1
|
+
#NOTE this is a loose collection of examples for most of the Echowrap methods
|
2
|
+
#Some of the code is kinda ugly, but you can try adding your keys
|
3
|
+
#and then commenting and uncommenting the code you want to run:
|
4
|
+
#
|
5
|
+
# $ ruby echowrap_example.rb
|
6
|
+
#
|
7
|
+
#
|
8
|
+
#
|
9
|
+
#
|
10
|
+
require 'echowrap'
|
11
|
+
|
12
|
+
Echowrap.configure do |config|
|
13
|
+
config.api_key = 'YOUR_API_KEY'
|
14
|
+
config.consumer_key = 'YOUR_CONSUMER_KEY'
|
15
|
+
config.shared_secret = 'YOUR_SHARED_SECRET'
|
16
|
+
end
|
17
|
+
|
18
|
+
#beginning = Time.now
|
19
|
+
Echowrap.song_search(:key => 8,
|
20
|
+
:mode => 0,
|
21
|
+
:min_tempo => 87,
|
22
|
+
:max_tempo => 93,
|
23
|
+
:artist_min_familiarity => 0.8,
|
24
|
+
:results => 100,
|
25
|
+
:sort => 'danceability-desc'
|
26
|
+
).map do |song|
|
27
|
+
puts "#{song.id} #{song.artist_id} #{song.artist_name} #{song.title}"
|
28
|
+
end
|
29
|
+
#puts "Time elapsed: #{Time.now - beginning} seconds."
|
30
|
+
|
31
|
+
#puts Echowrap.track_upload(:url => 'http://freedownloads.last.fm/download/552087758/Mars%2B%2528bonus%2529.mp3').inspect
|
32
|
+
#beginning = Time.now
|
33
|
+
#Add path to local file on the next line
|
34
|
+
#TRACK_NAME = "DOt_-_05_-_IMF.mp3"
|
35
|
+
#MAX_ATTEMPTS = 5
|
36
|
+
#attempts = 0
|
37
|
+
#puts "uploading..."
|
38
|
+
#begin
|
39
|
+
#track = Echowrap.track_upload(:track => File.new(TRACK_NAME), :filetype => 'mp3')
|
40
|
+
#puts track.inspect
|
41
|
+
#rescue Echowrap::Error::ClientError
|
42
|
+
#puts "retrying upload attempt(#{attempts.to_s})"
|
43
|
+
#attempts += 1
|
44
|
+
#retry if(attempts < MAX_ATTEMPTS)
|
45
|
+
#end
|
46
|
+
#puts "#{track.id} was uploaded"
|
47
|
+
#puts "waiting for analysis..."
|
48
|
+
#sleep(30)
|
49
|
+
#puts "getting profile..."
|
50
|
+
#begin
|
51
|
+
#track = Echowrap.track_profile(:id => 'TRXDGYL140476CA0A8', :bucket => 'audio_summary')
|
52
|
+
#puts track.inspect
|
53
|
+
#puts track.inspect
|
54
|
+
#rescue Echowrap::Error::ClientError
|
55
|
+
#attempts += 1
|
56
|
+
#puts "retrying profile attempt(#{attempts.to_s})"
|
57
|
+
#retry if(attempts < MAX_ATTEMPTS)
|
58
|
+
|
59
|
+
#end
|
60
|
+
|
61
|
+
#puts "id: #{track.id}" + "\n\n"
|
62
|
+
#puts "analysis_url: #{track.audio_summary.analysis_url}" + "\n\n"
|
63
|
+
#puts "danceability: #{track.audio_summary.danceability}" + "\n\n"
|
64
|
+
#puts "energy: #{track.audio_summary.energy}" + "\n\n"
|
65
|
+
#puts "loudness: #{track.audio_summary.loudness}" + "\n\n"
|
66
|
+
#puts "key: #{track.audio_summary.key}" + "\n\n"
|
67
|
+
#puts "mode: #{track.audio_summary.mode}" + "\n\n"
|
68
|
+
#puts "tempo: #{track.audio_summary.tempo}" + "\n\n"
|
69
|
+
#puts "Time elapsed: #{Time.now - beginning} seconds."
|
70
|
+
#track.audio_summary.attributes.each_pair{|k,v| puts "#{k.to_s}: #{v.to_s} \n\n"}
|
71
|
+
#puts Echowrap.track_analysis(:url => 'http://echonest-analysis.s3.amazonaws.com/TR/TRXDGYL140476CA0A8/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1375588509&Signature=gquPp7TyRMb6He9MxALhhLBGbJw%3D').inspect
|
72
|
+
|
73
|
+
#puts Echowrap.song_profile(:id=> 'SOCZMFK12AC468668F').inspect
|
74
|
+
|
75
|
+
#puts Echowrap.song_identify(:query => File.new('spec/fixtures/billie_jean_query.json')).inspect
|
76
|
+
#fingerprint = "eJxVlIuNwzAMQ1fxCDL133-xo1rnGqNAEcWy_
|
77
|
+
#ERa2aKeZmW9ustWVYrXrl5bthn_laFkzguNWpk
|
78
|
+
#lEmoTB74JKYZSPlbJ0sy9fQrsrbEaO9W3bsbaW
|
79
|
+
#OoK7IhkHFaf_ag2d75oOQSZczbz5CKA7XgTIBI
|
80
|
+
#XASvFi0A3W8pMUZ7FZTWTVbujCcADlQ_f_WbdR
|
81
|
+
#NJ2vDUwSF0EZmFvAku_CVy440fgiIvArWZZWoJ
|
82
|
+
#7GWd-CVTYC5FCFI8GQdECdROE20UQfLoIUmhLC
|
83
|
+
#7IiByF1gzbAs3tsSKctyC76MPJlHRsZ5qhSQhu
|
84
|
+
#_CJFcKtW4EMrHSIrpTGLFqsdItj1H9JYHQYN7W
|
85
|
+
#2nkC6GDPjZTAzL9dx0fS4M1FoROHh9YhLHWdRc
|
86
|
+
#hQSd_CLTpOHkQQP3xQsA2-sLOUD7CzxU0GmHVd
|
87
|
+
#Ixh46Oide0NrNEmjghG44Ax_k2AoDHsiV6WsiD
|
88
|
+
#6OFm8y-0Lyt8haDBBzeMlAnTuuGYIB4WA2lEPA
|
89
|
+
#WbdeOabgFN6TQMs6ctLA5fHyKMBB0veGrjPfP0
|
90
|
+
#0IAlWNm9n7hEh5PiYYBGKQDP-x4F0CL8HkhoQn
|
91
|
+
#RWN997JyEpnHFR7EhLPQMZmgXS68hsHktEVErr
|
92
|
+
#anvSSR2VwfJhQCnkuwhBUcINNY-xu1pmw3PmBq
|
93
|
+
#U9-8xu0kiF1ngOa8vwBSSzzNw==".gsub("\n", ' ')
|
94
|
+
#puts Echowrap.song_identify(:code => fingerprint).inspect
|
95
|
+
#fingerprint = <<FINGERPRINT
|
96
|
+
#keJxVlIuNwzAMQ1fxCDL133-xo1rnGqNAEcWy_ERa2aKeZmW9ustWVYrXrl5bthn_laFkzguNWpklEmoTB74JKYZSPlbJ0sy9fQrsrbEaO9W3bsbaWOoK7IhkHFaf_ag2d75oOQSZczbz5CKA7XgTIBIXASvFi0A3W8pMUZ7FZTWTVbujCcADlQ_f_WbdRNJ2vDUwSF0EZmFvAku_CVy440fgiIvArWZZWoJ7GWd-CVTYC5FCFI8GQdECdROE20UQfLoIUmhLC7IiByF1gzbAs3tsSKctyC76MPJlHRsZ5qhSQhu_CJFcKtW4EMrHSIrpTGLFqsdItj1H9JYHQYN7W2nkC6GDPjZTAzL9dx0fS4M1FoROHh9YhLHWdRchQSd_CLTpOHkQQP3xQsA2-sLOUD7CzxU0GmHVdIxh46Oide0NrNEmjghG44Ax_k2AoDHsiV6WsiD6OFm8y-0Lyt8haDBBzeMlAnTuuGYIB4WA2lEPAWbdeOabgFN6TQMs6ctLA5fHyKMBB0veGrjPfP00IAlWNm9n7hEh5PiYYBGKQDP-x4F0CL8HkhoQnRWN997JyEpnHFR7EhLPQMZmgXS68hsHktEVErranvSSR2VwfJhQCnkuwhBUcINNY-xu1pmw3PmBqU9-8xu0kiF1ngOa8vwBSSzzNw==
|
97
|
+
#FINGERPRINT
|
98
|
+
|
99
|
+
#puts fingerprint
|
100
|
+
|
101
|
+
|
102
|
+
#query = '{
|
103
|
+
#"metadata": {
|
104
|
+
#"artist": "Michael jackson",
|
105
|
+
#"release": "800 chansons des annes 80",
|
106
|
+
#"title": "Billie jean",
|
107
|
+
#"genre": "",
|
108
|
+
#"bitrate": 192,
|
109
|
+
#"sample_rate": 44100,
|
110
|
+
#"duration": 294,
|
111
|
+
#"filename": "../billie_jean.mp3",
|
112
|
+
#"samples_decoded": 220598,
|
113
|
+
#"given_duration": 20,
|
114
|
+
#"version": 3.13
|
115
|
+
#},
|
116
|
+
#"code": "' + fingerprint + '"}'
|
117
|
+
#query = "{
|
118
|
+
#\"metadata\":{
|
119
|
+
#\"artist\":\"Michael jackson\",
|
120
|
+
#\"release\": \"800 chansons des annes 80\",
|
121
|
+
#\"title\": \"Billie jean\",
|
122
|
+
#\"genre\": \"\",
|
123
|
+
#\"bitrate\": 192,
|
124
|
+
#\"sample_rate\": 44100,
|
125
|
+
#\"duration\": 294,
|
126
|
+
#\"filename\": \"../billie_jean.mp3\",
|
127
|
+
#\"samples_decoded\": 220598,
|
128
|
+
#\"given_duration\": 20,
|
129
|
+
#\"version\": 3.13
|
130
|
+
#},
|
131
|
+
#\"code\": #{fingerprint}
|
132
|
+
#}"
|
133
|
+
|
134
|
+
#puts query
|
135
|
+
#puts Echowrap.song_identify(:query => query).inspect
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
#artists = Echowrap.artist_search(:name => 'macklemore', :bucket => ['artist_location', 'biographies'])
|
140
|
+
#puts artists.first.location.location
|
141
|
+
|
142
|
+
#puts Echowrap.artist_search(:name => 'daft', :results => 3).inspect
|
143
|
+
|
144
|
+
#puts Echowrap.artist_search(:name => 'daft punk', :bucket => ['hotttnesss', 'familiarity', 'artist_location', 'songs'], :results => 1).inspect
|
145
|
+
|
146
|
+
#puts Echowrap.artist_search(:description => 'quirky', :style => 'indie', :mood => 'chill^1.2', :results => 3).inspect
|
147
|
+
|
148
|
+
#puts Echowrap.artist_search(:style => '-country', :results => 3).inspect
|
149
|
+
|
150
|
+
#puts Echowrap.artist_search(:results => 3, :artist_start_year_after => '1970', :artist_end_year_before => 'present').inspect
|
151
|
+
|
152
|
+
##puts Echowrap.artist_search(:results => 3, :artist_location => 'boston', :bucket => 'artist_location').inspect
|
153
|
+
#
|
154
|
+
#puts Echowrap.artist_search(:artist_location => 'city:boston', :bucket => 'artist_location', :results => 3).inspect
|
155
|
+
|
156
|
+
#puts Echowrap.artist_search(:artist_location => 'country:brazil', :bucket => 'artist_location',:results => 3).inspect
|
157
|
+
|
158
|
+
|
159
|
+
#puts Echowrap.artist_search(:style => 'rock', :max_familiarity => 0.80, :min_familiarity => 0.10,
|
160
|
+
#:sort => 'hotttnesss-desc', :results => 3).inspect
|
161
|
+
|
162
|
+
#puts Echowrap.artist_biographies(:id => 'ARH6W4X1187B99274F', :results => 1).inspect
|
163
|
+
|
164
|
+
#puts Echowrap.artist_biographies(:name => "Daft Punk", :results => 1).inspect
|
165
|
+
|
166
|
+
#puts Echowrap.artist_blogs(:id => 'ARH6W4X1187B99274F', :results => 3).inspect
|
167
|
+
|
168
|
+
#puts Echowrap.artist_blogs(:name => 'Daft Punk', :results => 1).inspect
|
169
|
+
|
170
|
+
#puts Echowrap.artist_familiarity(:id => 'ARH6W4X1187B99274F').inspect
|
171
|
+
|
172
|
+
#puts Echowrap.artist_familiarity(:name => 'Daft Punk').inspect
|
173
|
+
|
174
|
+
#puts Echowrap.artist_hotttnesss(:id => 'ARH6W4X1187B99274F').inspect
|
175
|
+
|
176
|
+
#puts Echowrap.artist_hotttnesss(:name => 'Elvis Presley').inspect
|
177
|
+
|
178
|
+
#puts Echowrap.artist_images(:id => 'ARH6W4X1187B99274F', :results => 3).inspect
|
179
|
+
|
180
|
+
#puts Echowrap.artist_images(:name => 'Daft Punk', :results => 1).inspect
|
181
|
+
|
182
|
+
#puts Echowrap.artist_list_genres.inspect
|
183
|
+
|
184
|
+
#puts Echowrap.artist_list_terms(:type => 'mood').inspect
|
185
|
+
|
186
|
+
#puts Echowrap.artist_news(:id => 'ARH6W4X1187B99274F', :results => 1).inspect
|
187
|
+
|
188
|
+
#puts Echowrap.artist_reviews(:id => 'ARH6W4X1187B99274F', :results => 2).inspect
|
189
|
+
#
|
190
|
+
#puts Echowrap.artist_profile(:id => 'ARH6W4X1187B99274F').inspect
|
191
|
+
|
192
|
+
#puts Echowrap.artist_profile(:name=> 'Daft Punk').inspect
|
193
|
+
|
194
|
+
#puts Echowrap.artist_extract(:text => 'This is a story about Macklemore').inspect
|
195
|
+
|
196
|
+
#puts Echowrap.artist_songs(:id => 'ARH6W4X1187B99274F').inspect
|
197
|
+
|
198
|
+
#puts Echowrap.song_search(:title => 'Fire', :artist => 'Kasabian', :bucket => 'audio_summary').inspect
|
199
|
+
#puts Echowrap.song_search(:style => 'rock',
|
200
|
+
#:results => 3,
|
201
|
+
#:sort => 'song-hotttnesss-desc').inspect
|
202
|
+
#song = Echowrap.song_search(:artist => 'Macklemore', :bucket => 'audio_summary')
|
203
|
+
#song = Echowrap.song_search(:artist => 'Macklemore', :results => 3)
|
204
|
+
#puts song.inspect
|
205
|
+
#puts song.first.audio_summary
|
206
|
+
#songs = Echowrap.song_search(:artist => 'Macklemore', :bucket => ['artist_location'])
|
207
|
+
#songs = Echowrap.song_search(:artist => 'Macklemore',
|
208
|
+
#:bucket => ['audio_summary', 'artist_location'],
|
209
|
+
#:results => 1)
|
210
|
+
#puts songs.inspect
|
211
|
+
#puts songs.first.title
|
212
|
+
#puts songs.first.audio_summary.tempo
|
213
|
+
#puts songs.first.artist_location.location
|
214
|
+
#puts Echowrap.artist_similar(:name => "Vampire Weekend").map(&:name).join(", ").inspect
|
215
|
+
#puts Echowrap.artist_songs(:name => 'Jay-Z',:results => 10).inspect
|
216
|
+
#puts Echowrap.artist_suggest(:name => "Daft Pu", :results => 3).inspect
|
217
|
+
|
218
|
+
#puts Echowrap.artist_terms(:name => "Daft Punk").inspect
|
219
|
+
|
220
|
+
#puts Echowrap.artist_top_hottt(:genre => "hip hop").inspect
|
221
|
+
|
222
|
+
#puts Echowrap.artist_top_terms.inspect
|
223
|
+
|
224
|
+
#puts Echowrap.artist_twitter(:name => 'Kanye West').inspect
|
225
|
+
#puts Echowrap.artist_urls(:name => 'Daft Punk').inspect
|
226
|
+
|
227
|
+
#puts Echowrap.artist_video(:name => 'radiohead', :results => 3).inspect
|
228
|
+
|
229
|
+
#puts Echowrap.artist_similar(:id => 'ARH6W4X1187B99274F', :results => 3).inspect
|
230
|
+
#puts Echowrap.artist_similar(:name => 'Daft Punk', :results => 3).inspect
|
231
|
+
#puts Echowrap.playlist_basic(:artist => 'Vampire Weekend', :results => 3).inspect
|
232
|
+
|
233
|
+
#puts Echowrap.playlist_static(:artist => 'Empire of the Sun', :results => 3).inspect
|
234
|
+
|
235
|
+
#puts Echowrap.playlist_dynamic_create(:artist => 'Daft Punk').inspect
|
236
|
+
|
237
|
+
# playlist = Echowrap.playlist_dynamic_create(:artist => 'Daft Punk')
|
238
|
+
#
|
239
|
+
#puts Echowrap.playlist_dynamic_restart(:artist => 'MGMT', :session_id => '8dd625f20b134c189b277c84324b392e').inspect
|
240
|
+
|
241
|
+
# playlist = Echowrap.playlist_dynamic_create(:artist => 'Daft Punk')
|
242
|
+
#
|
243
|
+
#puts Echowrap.playlist_dynamic_next(:session_id => '8dd625f20b134c189b277c84324b392e').inspect
|
244
|
+
|
245
|
+
# playlist = Echowrap.playlist_dynamic_create(:artist => 'Daft Punk')
|
246
|
+
#
|
247
|
+
# song = Echowrap.playlist_dynamic_next(:session_id => playlist.session_id).songs.first
|
248
|
+
#
|
249
|
+
#puts Echowrap.playlist_dynamic_feedback(:session_id => '8dd625f20b134c189b277c84324b392e', :favorite_song => 'SOACYKQ13F4A044137').inspect
|
250
|
+
|
251
|
+
# playlist = Echowrap.playlist_dynamic_create(:artist => 'Daft Punk')
|
252
|
+
# puts playlist.session_id
|
253
|
+
#
|
254
|
+
# song = Echowrap.playlist_dynamic_next(:session_id => playlist.session_id).songs.first
|
255
|
+
#
|
256
|
+
#puts Echowrap.playlist_dynamic_steer(:session_id => '8dd625f20b134c189b277c84324b392e', :min_danceability => 0.5).inspect
|
257
|
+
|
258
|
+
# playlist = Echowrap.playlist_dynamic_create(:artist => 'Daft Punk')
|
259
|
+
#puts Echowrap.playlist_dynamic_info(:session_id => '8dd625f20b134c189b277c84324b392e').inspect
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
# playlist = Echowrap.playlist_dynamic_create(:artist => 'Daft Punk')
|
264
|
+
#puts Echowrap.playlist_dynamic_delete(:session_id => '8dd625f20b134c189b277c84324b392e').inspect
|
265
|
+
|
266
|
+
#puts Echowrap.taste_profile_create(:name => "Tim's new profile", :type => 'general').inspect
|
267
|
+
|
268
|
+
# taste_profile = Echowrap.taste_profile_create(:name => "Tim's new profile #{(0...50).map{ ('a'..'z').to_a[rand(26)] }.join}", :type => 'song')
|
269
|
+
#data = <<DATA
|
270
|
+
#[{"item": {
|
271
|
+
#"item_id": "NewCat-SODJXOA1313438FB61",
|
272
|
+
#"song_id": "SODJXOA1313438FB61"
|
273
|
+
#}}]
|
274
|
+
#DATA
|
275
|
+
#
|
276
|
+
#
|
277
|
+
#
|
278
|
+
# puts data
|
279
|
+
#
|
280
|
+
#puts Echowrap.taste_profile_update(:id => 'CAUCTMD1404B479E02', :data=> data).inspect
|
281
|
+
#
|
282
|
+
|
283
|
+
#puts Echowrap.taste_profile_create(:name => 'My new playlist', :type => 'song').inspect
|
284
|
+
|
285
|
+
#
|
286
|
+
#puts Echowrap.taste_profile_keyvalues(:id => 'CAUCTMD1404B479E02').inspect
|
287
|
+
|
288
|
+
# puts Echowrap.taste_profile_list.inspect
|
289
|
+
|
290
|
+
|
291
|
+
# taste_profiles = Echowrap.taste_profile_list
|
292
|
+
# puts taste_profiles.inspect
|
293
|
+
# taste_profiles.each do |taste_profile|
|
294
|
+
# puts "DELETING: #{taste_profile.name}"
|
295
|
+
#puts Echowrap.taste_profile_delete(:id => 'CAUCTMD1404B479E02').inspect
|
296
|
+
# end
|
297
|
+
|
298
|
+
#puts Echowrap.taste_profile_list.inspect
|
299
|
+
# taste_profile = Echowrap.taste_profile_create(:name => "Tim's Second Test Profile", :type => 'song')
|
300
|
+
# puts taste_profile.inspect
|
301
|
+
#Tim's Test Profile
|
302
|
+
#CAVSCUQ13EBDDD2DB9
|
303
|
+
#Tim's Second Test Profile
|
304
|
+
#CAUMJHW13EBF7904AE
|
305
|
+
|
306
|
+
#puts Echowrap.taste_profile_profile(:id => 'CAUCTMD1404B479E02').inspect
|
307
|
+
|
308
|
+
# 5 songs
|
309
|
+
# ['B.O.B', "That's the joint", 'Push it', 'Me, Myself and I', 'California Love'].each do |song_name|
|
310
|
+
# puts Echowrap.song_search(:title => 'Me, Myself, and I', :artist => 'De La Soul').inspect
|
311
|
+
# end
|
312
|
+
|
313
|
+
#['SOMYUOW1311AFD8144',
|
314
|
+
#'SOJWGUN12AB0180CC9',
|
315
|
+
#'SOCEHOV136F247B1D2',
|
316
|
+
#'SOMSFTP1377AC0A711',
|
317
|
+
#'SOBCDNJ1377548716B']
|
318
|
+
|
319
|
+
#data = <<DATA
|
320
|
+
#[
|
321
|
+
#{"item":
|
322
|
+
#{
|
323
|
+
#"item_id": "NewItem-SOMYUOW1311AFD8144",
|
324
|
+
#"song_id": "SOMYUOW1311AFD8144"
|
325
|
+
#}
|
326
|
+
#},
|
327
|
+
|
328
|
+
#{"item":
|
329
|
+
#{
|
330
|
+
#"item_id": "NewItem-SOJWGUN12AB0180CC9",
|
331
|
+
#"song_id": "SOJWGUN12AB0180CC9"
|
332
|
+
#}
|
333
|
+
#},
|
334
|
+
|
335
|
+
#{"item":
|
336
|
+
#{
|
337
|
+
#"item_id": "NewItem-SOCEHOV136F247B1D2",
|
338
|
+
#"song_id": "SOCEHOV136F247B1D2"
|
339
|
+
#}
|
340
|
+
#},
|
341
|
+
|
342
|
+
#{"item":
|
343
|
+
#{
|
344
|
+
#"item_id": "NewItem-SOMSFTP1377AC0A711",
|
345
|
+
#"song_id": "SOMSFTP1377AC0A711"
|
346
|
+
#}
|
347
|
+
#},
|
348
|
+
|
349
|
+
#{"item":
|
350
|
+
#{
|
351
|
+
#"item_id": "NewItem-SOBCDNJ1377548716B",
|
352
|
+
#"song_id": "SOBCDNJ1377548716B"
|
353
|
+
#}
|
354
|
+
#}
|
355
|
+
|
356
|
+
|
357
|
+
#]
|
358
|
+
#DATA
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
# puts data
|
363
|
+
#
|
364
|
+
# puts Echowrap.taste_profile_update(:id => 'CAUMJHW13EBF7904AE', :data=> data).inspect
|
365
|
+
|
366
|
+
# ticket = 'CAUMJHW13EBF7904AED13DFDEE0CDC4A'
|
367
|
+
# #
|
368
|
+
#puts Echowrap.taste_profile_status(:ticket => 'CAUCTMD1404B479E023314231A25E348').inspect
|
369
|
+
|
370
|
+
#puts Echowrap.taste_profile_read(:id => 'CAUCTMD1404B479E02', :item_id => 'NewCat-SOYRTFI1374C384A00').inspect
|
371
|
+
|
372
|
+
#puts Echowrap.taste_profile_play(:id => 'CAUCTMD1404B479E02', :item => 'NewCat-SOYRTFI1374C384A00').inspect
|
373
|
+
|
374
|
+
#puts Echowrap.taste_profile_skip(:id => 'CAUCTMD1404B479E02', :item => 'NewCat-SOYRTFI1374C384A00', :skips => 5).inspect
|
375
|
+
|
376
|
+
#puts Echowrap.taste_profile_ban(:id => 'CAUCTMD1404B479E02', :item => 'NewCat-SOYRTFI1374C384A00').inspect
|
377
|
+
|
378
|
+
#puts Echowrap.taste_profile_favorite(:id => 'CAUCTMD1404B479E02', :item => 'NewCat-SOYRTFI1374C384A00').inspect
|
379
|
+
|
380
|
+
#puts Echowrap.taste_profile_rate(:id => 'CAUCTMD1404B479E02', :item => 'NewCat-SOYRTFI1374C384A00', :rating => 7).inspect
|
381
|
+
|
382
|
+
#puts Echowrap.taste_profile_feed(:id => 'CAUCTMD1404B479E02').inspect
|
383
|
+
|
384
|
+
#puts Echowrap.taste_profile_similar(:id => 'CAUCTMD1404B479E02').inspect
|
385
|
+
#puts Echowrap.taste_profile_predict(:id => 'CAUCTMD1404B479E02', :category => 'adventurousness').inspect
|
386
|
+
|
387
|
+
|
388
|
+
#puts Echowrap.sandbox_list(:sandbox => 'emi_gorillaz', :results => 3).inspect
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
#puts Echowrap.sandbox_access(:sandbox => 'emi_gorillaz', :id => 'a0ce7e489bb28be4842b81d444d6bd0f').inspect
|
393
|
+
|
394
|
+
#puts Echowrap.oauth_timestamp.inspect
|
395
|
+
|
data/lib/echowrap/version.rb
CHANGED
@@ -2,7 +2,7 @@ module Echowrap
|
|
2
2
|
class Version
|
3
3
|
MAJOR = 0 unless defined? Echowrap::Version::MAJOR
|
4
4
|
MINOR = 1 unless defined? Echowrap::Version::MINOR
|
5
|
-
PATCH =
|
5
|
+
PATCH = 1 unless defined? Echowrap::Version::PATCH
|
6
6
|
PRE = nil unless defined? Echowrap::Version::PRE
|
7
7
|
|
8
8
|
class << self
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: echowrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tim Case
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-03 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: faraday
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.9.0
|
19
|
+
version: 0.9.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.9.0
|
26
|
+
version: 0.9.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: multi_json
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: simple_oauth
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -73,6 +66,7 @@ files:
|
|
73
66
|
- README.md
|
74
67
|
- Rakefile
|
75
68
|
- echowrap.gemspec
|
69
|
+
- examples/echowrap_examples.rb
|
76
70
|
- lib/echowrap.rb
|
77
71
|
- lib/echowrap/analysis.rb
|
78
72
|
- lib/echowrap/api/artist.rb
|
@@ -228,27 +222,26 @@ files:
|
|
228
222
|
homepage: https://github.com/timcase/echowrap
|
229
223
|
licenses:
|
230
224
|
- MIT
|
225
|
+
metadata: {}
|
231
226
|
post_install_message:
|
232
227
|
rdoc_options: []
|
233
228
|
require_paths:
|
234
229
|
- lib
|
235
230
|
required_ruby_version: !ruby/object:Gem::Requirement
|
236
|
-
none: false
|
237
231
|
requirements:
|
238
|
-
- -
|
232
|
+
- - '>='
|
239
233
|
- !ruby/object:Gem::Version
|
240
234
|
version: '0'
|
241
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
|
-
none: false
|
243
236
|
requirements:
|
244
|
-
- -
|
237
|
+
- - '>='
|
245
238
|
- !ruby/object:Gem::Version
|
246
239
|
version: '0'
|
247
240
|
requirements: []
|
248
241
|
rubyforge_project:
|
249
|
-
rubygems_version:
|
242
|
+
rubygems_version: 2.0.3
|
250
243
|
signing_key:
|
251
|
-
specification_version:
|
244
|
+
specification_version: 4
|
252
245
|
summary: A Ruby interface to the Echonest API.
|
253
246
|
test_files:
|
254
247
|
- spec/echonest/api/artist_spec.rb
|