Class: Rocksky::Resources::Shout
- Defined in:
- lib/rocksky/resources/shout.rb
Overview
‘app.rocksky.shout.*` endpoints.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create_shout(message:, **extra) ⇒ Object
Create a shout.
-
#get_album_shouts(uri:, limit: nil, offset: nil) ⇒ Object
Shouts on an album.
-
#get_artist_shouts(uri:, limit: nil, offset: nil) ⇒ Object
Shouts on an artist.
-
#get_profile_shouts(did:, limit: nil, offset: nil) ⇒ Object
Shouts on a profile.
-
#get_shout_replies(uri:, limit: nil, offset: nil) ⇒ Object
Replies to a shout.
-
#get_track_shouts(uri:) ⇒ Object
Shouts on a track.
-
#remove_shout(id:) ⇒ Object
Remove a shout.
-
#reply_shout(shout_id:, message:) ⇒ Object
Reply to a shout.
-
#report_shout(shout_id:, reason:) ⇒ Object
Report a shout.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Rocksky::Resources::Base
Instance Method Details
#create_shout(message:, **extra) ⇒ Object
Create a shout.
6 7 8 9 |
# File 'lib/rocksky/resources/shout.rb', line 6 def create_shout(message:, **extra) body = { message: }.merge(extra).compact procedure("app.rocksky.shout.createShout", body: body) end |
#get_album_shouts(uri:, limit: nil, offset: nil) ⇒ Object
Shouts on an album.
35 36 37 38 |
# File 'lib/rocksky/resources/shout.rb', line 35 def get_album_shouts(uri:, limit: nil, offset: nil) query("app.rocksky.shout.getAlbumShouts", uri: uri, limit: limit, offset: offset) end |
#get_artist_shouts(uri:, limit: nil, offset: nil) ⇒ Object
Shouts on an artist.
41 42 43 44 |
# File 'lib/rocksky/resources/shout.rb', line 41 def get_artist_shouts(uri:, limit: nil, offset: nil) query("app.rocksky.shout.getArtistShouts", uri: uri, limit: limit, offset: offset) end |
#get_profile_shouts(did:, limit: nil, offset: nil) ⇒ Object
Shouts on a profile.
29 30 31 32 |
# File 'lib/rocksky/resources/shout.rb', line 29 def get_profile_shouts(did:, limit: nil, offset: nil) query("app.rocksky.shout.getProfileShouts", did: did, limit: limit, offset: offset) end |
#get_shout_replies(uri:, limit: nil, offset: nil) ⇒ Object
Replies to a shout.
52 53 54 55 |
# File 'lib/rocksky/resources/shout.rb', line 52 def get_shout_replies(uri:, limit: nil, offset: nil) query("app.rocksky.shout.getShoutReplies", uri: uri, limit: limit, offset: offset) end |
#get_track_shouts(uri:) ⇒ Object
Shouts on a track.
47 48 49 |
# File 'lib/rocksky/resources/shout.rb', line 47 def get_track_shouts(uri:) query("app.rocksky.shout.getTrackShouts", uri: uri) end |
#remove_shout(id:) ⇒ Object
Remove a shout.
18 19 20 |
# File 'lib/rocksky/resources/shout.rb', line 18 def remove_shout(id:) procedure("app.rocksky.shout.removeShout", params: { id: id }) end |
#reply_shout(shout_id:, message:) ⇒ Object
Reply to a shout.
12 13 14 15 |
# File 'lib/rocksky/resources/shout.rb', line 12 def reply_shout(shout_id:, message:) procedure("app.rocksky.shout.replyShout", body: { shoutId: shout_id, message: }) end |
#report_shout(shout_id:, reason:) ⇒ Object
Report a shout.
23 24 25 26 |
# File 'lib/rocksky/resources/shout.rb', line 23 def report_shout(shout_id:, reason:) procedure("app.rocksky.shout.reportShout", body: { shoutId: shout_id, reason: reason }) end |