Class: Soundcloud2::Comments
- Defined in:
- lib/soundcloud2/comments.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
-
#comments(*args) ⇒ Object
GET /comments/id a group.
-
#initialize(*args) ⇒ Comments
constructor
Initialize on the Soundcloud::Client class.
Methods inherited from Client
#groups, #method_missing, #playlists, #tracks, #users
Constructor Details
#initialize(*args) ⇒ Comments
Initialize on the Soundcloud::Client class
6 7 8 |
# File 'lib/soundcloud2/comments.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/comments.rb', line 3 def api_key @api_key end |
#conn ⇒ Object (readonly)
Returns the value of attribute conn.
3 4 5 |
# File 'lib/soundcloud2/comments.rb', line 3 def conn @conn end |
Instance Method Details
#comments(*args) ⇒ Object
GET /comments/id a group
11 12 13 14 15 |
# File 'lib/soundcloud2/comments.rb', line 11 def comments(*args) = args..merge(:client_id => api_key) response = conn.get("/comments/#{args[0]}.json") { |req| req.params = } args.nil? ? response.body.send(sym) : response.body end |