soundcloud-ruby-api-wrapper 0.1.9 → 0.2.0
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.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/README.html +2 -2
- data/VERSION.yml +2 -2
- data/doc/classes/Soundcloud.html +213 -0
- data/doc/classes/Soundcloud.src/M000001.html +24 -0
- data/doc/classes/Soundcloud.src/M000002.html +19 -0
- data/doc/classes/Soundcloud/Models.html +135 -0
- data/doc/classes/Soundcloud/Models/Comment.html +197 -0
- data/doc/classes/Soundcloud/Models/Comment.src/M000007.html +22 -0
- data/doc/classes/Soundcloud/Models/Event.html +190 -0
- data/doc/classes/Soundcloud/Models/Event.src/M000009.html +18 -0
- data/doc/classes/Soundcloud/Models/Playlist.html +220 -0
- data/doc/classes/Soundcloud/Models/Playlist.src/M000009.html +20 -0
- data/doc/classes/Soundcloud/Models/Playlist.src/M000010.html +20 -0
- data/doc/classes/Soundcloud/Models/Track.html +348 -0
- data/doc/classes/Soundcloud/Models/Track.src/M000003.html +29 -0
- data/doc/classes/Soundcloud/Models/Track.src/M000004.html +18 -0
- data/doc/classes/Soundcloud/Models/Track.src/M000005.html +22 -0
- data/doc/classes/Soundcloud/Models/Track.src/M000006.html +28 -0
- data/doc/classes/Soundcloud/Models/User.html +284 -0
- data/doc/classes/Soundcloud/Models/User.src/M000008.html +18 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/soundcloud/models/base_rb.html +101 -0
- data/doc/files/lib/soundcloud/models/comment_rb.html +101 -0
- data/doc/files/lib/soundcloud/models/event_rb.html +101 -0
- data/doc/files/lib/soundcloud/models/playlist_rb.html +101 -0
- data/doc/files/lib/soundcloud/models/track_rb.html +101 -0
- data/doc/files/lib/soundcloud/models/user_rb.html +101 -0
- data/doc/files/lib/soundcloud_rb.html +127 -0
- data/doc/fr_class_index.html +33 -0
- data/doc/fr_file_index.html +33 -0
- data/doc/fr_method_index.html +36 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/soundcloud/models/user.rb +2 -2
- data/ruby-api-wrapper.gemspec +103 -0
- data/spec/soundcloud_comment_spec.rb +3 -3
- data/spec/soundcloud_playlist_spec.rb +4 -4
- data/spec/soundcloud_track_spec.rb +3 -3
- data/spec/soundcloud_user_spec.rb +4 -4
- metadata +39 -5
|
@@ -11,13 +11,13 @@ describe 'Soundcloud::Models::Comment' do
|
|
|
11
11
|
|
|
12
12
|
it 'should be able to create and delete a new comment for a track' do
|
|
13
13
|
|
|
14
|
-
old_count = @track.comments.
|
|
14
|
+
old_count = @track.comments.length
|
|
15
15
|
comment = @sc.Comment.create({:track_id => @track.id, :body => "new API Test comment"})
|
|
16
|
-
@track.comments.reload.
|
|
16
|
+
@track.comments.reload.length.should be old_count + 1
|
|
17
17
|
|
|
18
18
|
comment.destroy
|
|
19
19
|
|
|
20
|
-
@track.comments.reload.
|
|
20
|
+
@track.comments.reload.length.should be old_count
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
it 'should belong to a track and a user' do
|
|
@@ -22,20 +22,20 @@ describe 'Soundcloud::Models::Playlist' do
|
|
|
22
22
|
|
|
23
23
|
it 'should be able to find an existing playlist' do
|
|
24
24
|
pl = @sc.Playlist.find('static-test-playlist')
|
|
25
|
-
pl.tracks.
|
|
25
|
+
pl.tracks.length.should be >= 3
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
it 'should be able to delete tracks of a playlist and put them back' do
|
|
29
29
|
pl = @sc.Playlist.find('my-static-playlist')
|
|
30
|
-
old_count = pl.tracks.
|
|
30
|
+
old_count = pl.tracks.length
|
|
31
31
|
deleted_track = pl.tracks.first
|
|
32
32
|
pl.tracks.delete_at 0
|
|
33
33
|
pl.save
|
|
34
|
-
pl.tracks.
|
|
34
|
+
pl.tracks.length.should be == old_count -1
|
|
35
35
|
|
|
36
36
|
pl.tracks << deleted_track
|
|
37
37
|
pl.save
|
|
38
|
-
pl.tracks.
|
|
38
|
+
pl.tracks.length.should be == old_count
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
it 'should belong to a user' do
|
|
@@ -43,17 +43,17 @@ describe "Soundcloud::Models::Track" do
|
|
|
43
43
|
it 'should be able to add a user to permissions of a track and delete it again' do
|
|
44
44
|
track = @sc.Track.find(:one, :from => '/users/api-test-1/tracks/static-test-track')
|
|
45
45
|
|
|
46
|
-
old_count = track.permissions.
|
|
46
|
+
old_count = track.permissions.length
|
|
47
47
|
|
|
48
48
|
track.permissions << @api_test_3
|
|
49
49
|
track.permissions.save
|
|
50
50
|
|
|
51
|
-
track.permissions.
|
|
51
|
+
track.permissions.length.should be(old_count+1)
|
|
52
52
|
|
|
53
53
|
track.permissions.delete( @api_test_3 )
|
|
54
54
|
track.permissions.save
|
|
55
55
|
|
|
56
|
-
track.permissions.
|
|
56
|
+
track.permissions.length.should be(old_count)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
it 'should add, check and remove a favorite to "me"' do
|
|
@@ -25,7 +25,7 @@ describe "Soundcloud::Models::User" do
|
|
|
25
25
|
it 'should find all api-test users' do
|
|
26
26
|
test_for = 'api-test'
|
|
27
27
|
users = @sc.User.find(:all , :params => {:q => test_for})
|
|
28
|
-
users.
|
|
28
|
+
users.length.should be >= 3
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
it 'should check if a user has a contact' do
|
|
@@ -55,12 +55,12 @@ describe "Soundcloud::Models::User" do
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
it 'should find some fans of a user' do
|
|
58
|
-
@api_test_2.fans.
|
|
58
|
+
@api_test_2.fans.length.should be >= 1
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
it 'should find exactly one fan / two fans' do
|
|
62
|
-
@api_test_2.fans({:limit => 1}).
|
|
63
|
-
@api_test_2.fans({:limit => 2}).
|
|
62
|
+
@api_test_2.fans({:limit => 1}).length.should be == 1
|
|
63
|
+
@api_test_2.fans({:limit => 2}).length.should be == 2
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: soundcloud-ruby-api-wrapper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Johannes Wagener
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-07-01 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -43,11 +43,44 @@ extra_rdoc_files:
|
|
|
43
43
|
- README.html
|
|
44
44
|
- README.rdoc
|
|
45
45
|
files:
|
|
46
|
+
- .document
|
|
47
|
+
- .gitignore
|
|
46
48
|
- LICENSE
|
|
47
49
|
- README.html
|
|
48
50
|
- README.rdoc
|
|
49
51
|
- Rakefile
|
|
50
52
|
- VERSION.yml
|
|
53
|
+
- doc/classes/Soundcloud.html
|
|
54
|
+
- doc/classes/Soundcloud.src/M000001.html
|
|
55
|
+
- doc/classes/Soundcloud.src/M000002.html
|
|
56
|
+
- doc/classes/Soundcloud/Models.html
|
|
57
|
+
- doc/classes/Soundcloud/Models/Comment.html
|
|
58
|
+
- doc/classes/Soundcloud/Models/Comment.src/M000007.html
|
|
59
|
+
- doc/classes/Soundcloud/Models/Event.html
|
|
60
|
+
- doc/classes/Soundcloud/Models/Event.src/M000009.html
|
|
61
|
+
- doc/classes/Soundcloud/Models/Playlist.html
|
|
62
|
+
- doc/classes/Soundcloud/Models/Playlist.src/M000009.html
|
|
63
|
+
- doc/classes/Soundcloud/Models/Playlist.src/M000010.html
|
|
64
|
+
- doc/classes/Soundcloud/Models/Track.html
|
|
65
|
+
- doc/classes/Soundcloud/Models/Track.src/M000003.html
|
|
66
|
+
- doc/classes/Soundcloud/Models/Track.src/M000004.html
|
|
67
|
+
- doc/classes/Soundcloud/Models/Track.src/M000005.html
|
|
68
|
+
- doc/classes/Soundcloud/Models/Track.src/M000006.html
|
|
69
|
+
- doc/classes/Soundcloud/Models/User.html
|
|
70
|
+
- doc/classes/Soundcloud/Models/User.src/M000008.html
|
|
71
|
+
- doc/created.rid
|
|
72
|
+
- doc/files/lib/soundcloud/models/base_rb.html
|
|
73
|
+
- doc/files/lib/soundcloud/models/comment_rb.html
|
|
74
|
+
- doc/files/lib/soundcloud/models/event_rb.html
|
|
75
|
+
- doc/files/lib/soundcloud/models/playlist_rb.html
|
|
76
|
+
- doc/files/lib/soundcloud/models/track_rb.html
|
|
77
|
+
- doc/files/lib/soundcloud/models/user_rb.html
|
|
78
|
+
- doc/files/lib/soundcloud_rb.html
|
|
79
|
+
- doc/fr_class_index.html
|
|
80
|
+
- doc/fr_file_index.html
|
|
81
|
+
- doc/fr_method_index.html
|
|
82
|
+
- doc/index.html
|
|
83
|
+
- doc/rdoc-style.css
|
|
51
84
|
- lib/soundcloud.rb
|
|
52
85
|
- lib/soundcloud/models/base.rb
|
|
53
86
|
- lib/soundcloud/models/comment.rb
|
|
@@ -55,6 +88,7 @@ files:
|
|
|
55
88
|
- lib/soundcloud/models/playlist.rb
|
|
56
89
|
- lib/soundcloud/models/track.rb
|
|
57
90
|
- lib/soundcloud/models/user.rb
|
|
91
|
+
- ruby-api-wrapper.gemspec
|
|
58
92
|
- spec/fixtures/test_track.mp3
|
|
59
93
|
- spec/soundcloud_comment_spec.rb
|
|
60
94
|
- spec/soundcloud_event_spec.rb
|
|
@@ -90,10 +124,10 @@ signing_key:
|
|
|
90
124
|
specification_version: 2
|
|
91
125
|
summary: TODO
|
|
92
126
|
test_files:
|
|
127
|
+
- spec/soundcloud_spec.rb
|
|
128
|
+
- spec/soundcloud_user_spec.rb
|
|
93
129
|
- spec/soundcloud_comment_spec.rb
|
|
94
|
-
- spec/soundcloud_event_spec.rb
|
|
95
130
|
- spec/soundcloud_playlist_spec.rb
|
|
96
|
-
- spec/soundcloud_spec.rb
|
|
97
131
|
- spec/spec_helper.rb
|
|
98
|
-
- spec/
|
|
132
|
+
- spec/soundcloud_event_spec.rb
|
|
99
133
|
- spec/soundcloud_track_spec.rb
|