soundcloud2 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Alex Manelis
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -42,6 +42,35 @@ be found in the other subclassed modules.
42
42
 
43
43
  ## More Advanced Modules
44
44
 
45
+ ### Soundcloud::Comments Module
46
+ c = Soundcloud::Comments.new('YOUR_SOUNDCLOUD_API_KEY')
47
+ c.comments('23145109')
48
+
49
+ ### Soundcloud::Groups Module
50
+ g = Soundcloud::Groups.new('YOUR_SOUNDCLOUD_API_KEY')
51
+ g.groups('11440')
52
+ g.groups_moderators('11440')
53
+ g.groups_members('11440')
54
+ g.groups_contributors('11440')
55
+ g.groups_users('11440')
56
+ g.groups_tracks('11440')
57
+
58
+ ### Soundcloud::Playlists Module
59
+ p = Soundcloud::Playlists.new('YOUR_SOUNDCLOUD_API_KEY')
60
+ p.playlists('920731')
61
+ p.playlists_shared_to_users('4201929')
62
+ p.playlists_shared_to_emails('amanelis@gmail.com')
63
+
64
+ ### Soundcloud::Tracks Module
65
+ t = Soundcloud::Tracks.new('YOUR_SOUNDCLOUD_API_KEY')
66
+ t.tracks('20296934')
67
+ t.tracks_comments('20296934')
68
+ t.tracks_comments('20296934', '23145109')
69
+ t.tracks_favoriters('20296934')
70
+ t.tracks_favoriters('20296934', '2769794')
71
+ t.tracks_shared_to_users('20296934')
72
+ t.tracks_shared_to_emails('20296934')
73
+
45
74
  ### Soundcloud::Users Module
46
75
  u = Soundcloud::Users.new('YOUR_SOUNDCLOUD_API_KEY')
47
76
  u.user('4201929')
@@ -55,36 +84,6 @@ be found in the other subclassed modules.
55
84
  u.user_favorites('4201929')
56
85
  u.user_favorites('4201929', '1931470')
57
86
  u.user_groups('4201929')
58
-
59
- ### Soundcloud::Tracks Module
60
- t = Soundcloud::Tracks.new('YOUR_SOUNDCLOUD_API_KEY')
61
- t.tracks('20296934')
62
- t.tracks_comments('20296934')
63
- t.tracks_comments('20296934', '23145109')
64
- t.tracks_favoriters('20296934')
65
- t.tracks_favoriters('20296934', '2769794')
66
- t.tracks_shared_to_users('20296934')
67
- t.tracks_shared_to_emails('20296934')
68
-
69
- ### Soundcloud::Playlists Module
70
- p = Soundcloud::Playlists.new('YOUR_SOUNDCLOUD_API_KEY')
71
- p.playlists('920731')
72
- p.playlists_shared_to_users('4201929')
73
- p.playlists_shared_to_emails('amanelis@gmail.com')
74
-
75
- ### Soundcloud::Groups Module
76
- g = Soundcloud::Groups.new('YOUR_SOUNDCLOUD_API_KEY')
77
- g.groups('11440')
78
- g.groups_moderators('11440')
79
- g.groups_members('11440')
80
- g.groups_contributors('11440')
81
- g.groups_users('11440')
82
- g.groups_tracks('11440')
83
-
84
- ### Soundcloud::Comments Module
85
- c = Soundcloud::Comments.new('YOUR_SOUNDCLOUD_API_KEY')
86
- c.comments('23145109')
87
-
88
87
 
89
88
  ## Dependencies
90
89
  #### Install dependencies using bundler
@@ -31,20 +31,6 @@ module Soundcloud2
31
31
  args.nil? ? response.body.send(sym) : response.body
32
32
  end
33
33
 
34
- # GET /tracks/{id}/shared-to/users users who have access to the track
35
- def tracks_shared_to_users(*args)
36
- options = args.extract_options!.merge(:client_id => api_key)
37
- response = conn.get("/tracks/#{args[0]}/shared-to/users.json") { |req| req.params = options }
38
- args.nil? ? response.body.send(sym) : response.body
39
- end
40
-
41
- # GET /tracks/{id}/shared-to/emails email addresses who are invited to the track
42
- def tracks_shared_to_emails(*args)
43
- options = args.extract_options!.merge(:client_id => api_key)
44
- response = conn.get("/tracks/#{args[0]}/shared-to/emails.json") { |req| req.params = options }
45
- args.nil? ? response.body.send(sym) : response.body
46
- end
47
-
48
34
  # GET /tracks/{id}/secret-token secret token of the track
49
35
  def tracks_secret_token(*args)
50
36
  options = args.extract_options!.merge(:client_id => api_key)
@@ -1,3 +1,3 @@
1
1
  module Soundcloud2
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
data/soundcloud2.gemspec CHANGED
@@ -24,7 +24,9 @@ Gem::Specification.new do |s|
24
24
  s.add_runtime_dependency("faraday_middleware", '~> 0.7.0')
25
25
  s.add_runtime_dependency('hashie', '~> 1.1.0')
26
26
  s.add_runtime_dependency('yajl-ruby', '~> 0.8.1')
27
- s.add_runtime_dependency('multi_json', '~> 1.0.3')
27
+ # s.add_runtime_dependency('multi_json', '~> 1.0.3')
28
+ s.add_runtime_dependency('multi_json', '~> 0.0.2')
29
+
28
30
 
29
31
  s.files = `git ls-files`.split("\n")
30
32
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -11,28 +11,22 @@ describe Soundcloud2::Client do
11
11
  puts "---------------------------------------------------------"
12
12
  puts "Soundcloud::Client.new(API_KEY).tracks(:q => 'Song title')"
13
13
  results = Array.new
14
- results << @client.tracks(:q => 'Skrillex - Do Da Oliphant')
15
- results << @client.tracks(:q => 'Kryder K2')
16
- results << @client.tracks(:q => 'Ry Legit - Woody (CLIP)')
17
- results << @client.tracks(:q => 'Oblivion Feat. Ashley Merges - Bass Freq (Oblivion VIP) [FREE DOWNLOAD]')
18
- results << @client.tracks(:q => 'Kayla ft. Lil Jon - Step On It (Proper Villains remix)')
19
- results << @client.tracks(:q => 'Supreme - The Fortress (P0GMAN Remix) (CLIP) [FORTHCOMING BADMAN DIGITAL]')
20
- results << @client.tracks(:q => 'Dubsidia & Balkansky - Annoying Dog (Original Mix) DEMO Play Me Records')
14
+ results << @client.tracks(:q => 'Skrillex - Do Da Oliphant', :order => 'hotness')
15
+ results << @client.tracks(:q => 'Kryder K2', :order => 'hotness')
16
+ results << @client.tracks(:q => 'Ry Legit - Woody (CLIP)', :order => 'hotness')
17
+ results << @client.tracks(:q => 'Oblivion Feat. Ashley Merges - Bass Freq (Oblivion VIP) [FREE DOWNLOAD]', :order => 'hotness')
18
+ results << @client.tracks(:q => 'Kayla ft. Lil Jon - Step On It (Proper Villains remix)', :order => 'hotness')
19
+ results << @client.tracks(:q => 'Supreme - The Fortress (P0GMAN Remix) (CLIP) [FORTHCOMING BADMAN DIGITAL]', :order => 'hotness')
20
+ results << @client.tracks(:q => 'Dubsidia & Balkansky - Annoying Dog (Original Mix) DEMO Play Me Records', :order => 'hotness')
21
21
 
22
22
  results.each do |r|
23
23
  s = r.first
24
24
 
25
25
  puts "Song Title: #{s.title}"
26
26
  puts "Song id: #{s.id}"
27
- puts "Genre: #{s.genre}"
28
- puts "Slug: #{s.permalink}"
29
- puts "Comments: #{s.comment_count}"
30
- puts "Downloads: #{s.download_count}"
31
27
  puts "Playbacks: #{s.playback_count}"
32
- puts "Favorites: #{s.favoritings_count}"
33
28
  puts "https://api.soundcloud.com/tracks/#{s.id}/stream?client_id=281bf78db858fb70bf8ccef48976dde4"
34
29
  puts "*********************************************************************************************"
35
- puts s.inspect
36
30
  end
37
31
 
38
32
  end
@@ -36,15 +36,5 @@ describe Soundcloud2::Tracks do
36
36
  puts "TESTING: .tracks_favoriters/:id"
37
37
  puts @tracks.tracks_favoriters('20296934', '2769794')
38
38
  end
39
-
40
- it ".tracks_shared_to_users" do
41
- puts "TESTING: .tracks_shared_to_users"
42
- puts @tracks.tracks_shared_to_users('20296934')
43
- end
44
-
45
- it ".tracks_shared_to_emails" do
46
- puts "TESTING: .tracks_shared_to_emails"
47
- puts @tracks.tracks_shared_to_emails('20296934')
48
- end
49
39
  end
50
40
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: soundcloud2
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.1
5
+ version: 0.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alex Manelis
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-15 00:00:00 Z
13
+ date: 2011-10-16 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -141,7 +141,7 @@ dependencies:
141
141
  requirements:
142
142
  - - ~>
143
143
  - !ruby/object:Gem::Version
144
- version: 1.0.3
144
+ version: 0.0.2
145
145
  type: :runtime
146
146
  version_requirements: *id012
147
147
  description: A wrapper for the Soundcloud v2 API
@@ -157,6 +157,7 @@ files:
157
157
  - .gitignore
158
158
  - .rvmrc
159
159
  - Gemfile
160
+ - LICENSE.txt
160
161
  - README.md
161
162
  - Rakefile
162
163
  - lib/core_ext/array.rb
@@ -212,3 +213,4 @@ test_files:
212
213
  - spec/client/tracks_spec.rb
213
214
  - spec/client/users_spec.rb
214
215
  - spec/spec_helper.rb
216
+ has_rdoc: