Class: Soundcloud2::Playlists
- Defined in:
- lib/soundcloud2/playlists.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#conn ⇒ Object
readonly
Returns the value of attribute conn.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Playlists
constructor
Initialize on the Soundcloud::Client class.
- #playlists(*args) ⇒ Object
-
#playlists_shared_to_emails(*args) ⇒ Object
GET /playlists/id/shared-to/emails email addresses who are invited to the playlist.
-
#playlists_shared_to_users(*args) ⇒ Object
GET /playlists/id/shared-to/users users who have access to the track.
Methods inherited from Client
#groups, #method_missing, #tracks, #users
Constructor Details
#initialize(*args) ⇒ Playlists
Initialize on the Soundcloud::Client class
6 7 8 |
# File 'lib/soundcloud2/playlists.rb', line 6 def initialize(*args) super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Soundcloud2::Client
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/soundcloud2/playlists.rb', line 3 def api_key @api_key end |
#conn ⇒ Object (readonly)
Returns the value of attribute conn.
3 4 5 |
# File 'lib/soundcloud2/playlists.rb', line 3 def conn @conn end |
Instance Method Details
#playlists(*args) ⇒ Object
10 11 12 13 14 |
# File 'lib/soundcloud2/playlists.rb', line 10 def playlists(*args) = args..merge(:client_id => api_key) response = conn.get("/playlists/#{args[0]}.json") { |req| req.params = } args.nil? ? response.body.send(sym) : response.body end |
#playlists_shared_to_emails(*args) ⇒ Object
GET /playlists/id/shared-to/emails email addresses who are invited to the playlist
24 25 26 27 28 |
# File 'lib/soundcloud2/playlists.rb', line 24 def playlists_shared_to_emails(*args) = args..merge(:client_id => api_key) response = conn.get("/playlists/#{args[0]}/shared-to/emails.json") { |req| req.params = } args.nil? ? response.body.send(sym) : response.body end |
#playlists_shared_to_users(*args) ⇒ Object
GET /playlists/id/shared-to/users users who have access to the track
17 18 19 20 21 |
# File 'lib/soundcloud2/playlists.rb', line 17 def playlists_shared_to_users(*args) = args..merge(:client_id => api_key) response = conn.get("/playlists/#{args[0]}/shared-to/users.json") { |req| req.params = } args.nil? ? response.body.send(sym) : response.body end |