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
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (Soundcloud::Models::Comment)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/soundcloud/models/comment.rb, line 40</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:track</span>].<span class="ruby-identifier">nil?</span>
|
16
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:track_id</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:track</span>].<span class="ruby-identifier">id</span>
|
17
|
+
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:track</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">options</span>)
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,190 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Soundcloud::Models::Event</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Soundcloud::Models::Event</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/soundcloud/models/event_rb.html">
|
59
|
+
lib/soundcloud/models/event.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Base
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
SC API Attributes (as of 26/05/09):
|
84
|
+
</p>
|
85
|
+
<ul>
|
86
|
+
<li>type
|
87
|
+
|
88
|
+
</li>
|
89
|
+
<li>id
|
90
|
+
|
91
|
+
</li>
|
92
|
+
<li>created_at
|
93
|
+
|
94
|
+
</li>
|
95
|
+
<li>resource_id
|
96
|
+
|
97
|
+
</li>
|
98
|
+
<li>comment/track/user (embedded resource, depending on type)
|
99
|
+
|
100
|
+
</li>
|
101
|
+
</ul>
|
102
|
+
<p>
|
103
|
+
Custom Wrapper Attribute:
|
104
|
+
</p>
|
105
|
+
<ul>
|
106
|
+
<li><a href="Event.html#M000009">event_type</a> (access to type attribute,
|
107
|
+
since ‘type’ is a ruby keyword)
|
108
|
+
|
109
|
+
</li>
|
110
|
+
</ul>
|
111
|
+
<p>
|
112
|
+
Look up the resource attributes and filtering usage here:
|
113
|
+
</p>
|
114
|
+
<p>
|
115
|
+
<a
|
116
|
+
href="http://wiki.github.com/soundcloud/api/documentation#event">wiki.github.com/soundcloud/api/documentation#event</a>
|
117
|
+
</p>
|
118
|
+
<p>
|
119
|
+
Examples:
|
120
|
+
</p>
|
121
|
+
<pre>
|
122
|
+
# find the last 50 (default soundcloud limit) dropbox events and display the titles of the dropped tracks
|
123
|
+
dropbox_events = sc_client.Event.find(:all,:params => {:filter => 'drop'})
|
124
|
+
|
125
|
+
dropbox_events.each do |event|
|
126
|
+
p event.track.title
|
127
|
+
end
|
128
|
+
|
129
|
+
# find the last 50 (default soundcloud limit) events
|
130
|
+
sc_client.Event.find(:all)
|
131
|
+
</pre>
|
132
|
+
|
133
|
+
</div>
|
134
|
+
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<div id="method-list">
|
139
|
+
<h3 class="section-bar">Methods</h3>
|
140
|
+
|
141
|
+
<div class="name-list">
|
142
|
+
<a href="#M000009">event_type</a>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
</div>
|
147
|
+
|
148
|
+
|
149
|
+
<!-- if includes -->
|
150
|
+
|
151
|
+
<div id="section">
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<!-- if method_list -->
|
161
|
+
<div id="methods">
|
162
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
163
|
+
|
164
|
+
<div id="method-M000009" class="method-detail">
|
165
|
+
<a name="M000009"></a>
|
166
|
+
|
167
|
+
<div class="method-heading">
|
168
|
+
<a href="Event.src/M000009.html" target="Code" class="method-signature"
|
169
|
+
onclick="popupCode('Event.src/M000009.html');return false;">
|
170
|
+
<span class="method-name">event_type</span><span class="method-args">()</span>
|
171
|
+
</a>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="method-description">
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
</div>
|
183
|
+
|
184
|
+
|
185
|
+
<div id="validator-badges">
|
186
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
</body>
|
190
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>event_type (Soundcloud::Models::Event)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/soundcloud/models/event.rb, line 35</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">event_type</span>
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">attributes</span>[<span class="ruby-value str">'type'</span>]
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,220 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Soundcloud::Models::Playlist</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Soundcloud::Models::Playlist</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/soundcloud/models/playlist_rb.html">
|
59
|
+
lib/soundcloud/models/playlist.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Base
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Note: At the moment, you can‘t create or delete playlists or change
|
84
|
+
their permissions via <a href="../../Soundcloud.html">Soundcloud</a> API
|
85
|
+
</p>
|
86
|
+
<p>
|
87
|
+
SC API Attributes (as of 26/05/09):
|
88
|
+
</p>
|
89
|
+
<ul>
|
90
|
+
<li>created_at
|
91
|
+
|
92
|
+
</li>
|
93
|
+
<li>description
|
94
|
+
|
95
|
+
</li>
|
96
|
+
<li>genre
|
97
|
+
|
98
|
+
</li>
|
99
|
+
<li>id
|
100
|
+
|
101
|
+
</li>
|
102
|
+
<li>permalink
|
103
|
+
|
104
|
+
</li>
|
105
|
+
<li>title
|
106
|
+
|
107
|
+
</li>
|
108
|
+
<li>user_id
|
109
|
+
|
110
|
+
</li>
|
111
|
+
<li>permalink_url
|
112
|
+
|
113
|
+
</li>
|
114
|
+
<li>uri
|
115
|
+
|
116
|
+
</li>
|
117
|
+
<li>artwork_url
|
118
|
+
|
119
|
+
</li>
|
120
|
+
<li>duration
|
121
|
+
|
122
|
+
</li>
|
123
|
+
<li>type
|
124
|
+
|
125
|
+
</li>
|
126
|
+
<li>user (overwritten by wrapper)
|
127
|
+
|
128
|
+
</li>
|
129
|
+
<li>tracks (array)
|
130
|
+
|
131
|
+
</li>
|
132
|
+
</ul>
|
133
|
+
<p>
|
134
|
+
Custom Wrapper Attributes/Methods:
|
135
|
+
</p>
|
136
|
+
<ul>
|
137
|
+
<li>user
|
138
|
+
|
139
|
+
</li>
|
140
|
+
</ul>
|
141
|
+
<p>
|
142
|
+
Look up the resource attributes and filtering usage here:
|
143
|
+
</p>
|
144
|
+
<p>
|
145
|
+
<a
|
146
|
+
href="http://wiki.github.com/soundcloud/api/documentation#playlist">wiki.github.com/soundcloud/api/documentation#playlist</a>
|
147
|
+
</p>
|
148
|
+
<p>
|
149
|
+
Examples:
|
150
|
+
</p>
|
151
|
+
<pre>
|
152
|
+
# Find a Playlist and add a track to it
|
153
|
+
playlist = sc_client.Playlist.find('my-playlist')
|
154
|
+
track = sc_client.Track.find('my-track')
|
155
|
+
playlist.tracks << track
|
156
|
+
playlist.save
|
157
|
+
|
158
|
+
# Delete first song in playlist
|
159
|
+
playlist.tracks.delete playlist.tracks.first
|
160
|
+
playlist.save
|
161
|
+
</pre>
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div id="method-list">
|
169
|
+
<h3 class="section-bar">Methods</h3>
|
170
|
+
|
171
|
+
<div class="name-list">
|
172
|
+
<a href="#M000010">new</a>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
<!-- if includes -->
|
180
|
+
|
181
|
+
<div id="section">
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<!-- if method_list -->
|
191
|
+
<div id="methods">
|
192
|
+
<h3 class="section-bar">Public Class methods</h3>
|
193
|
+
|
194
|
+
<div id="method-M000010" class="method-detail">
|
195
|
+
<a name="M000010"></a>
|
196
|
+
|
197
|
+
<div class="method-heading">
|
198
|
+
<a href="Playlist.src/M000010.html" target="Code" class="method-signature"
|
199
|
+
onclick="popupCode('Playlist.src/M000010.html');return false;">
|
200
|
+
<span class="method-name">new</span><span class="method-args">(*args)</span>
|
201
|
+
</a>
|
202
|
+
</div>
|
203
|
+
|
204
|
+
<div class="method-description">
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
|
209
|
+
</div>
|
210
|
+
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
|
215
|
+
<div id="validator-badges">
|
216
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</body>
|
220
|
+
</html>
|