Class: Chute::V2::Votes
- Inherits:
-
Object
- Object
- Chute::V2::Votes
- Defined in:
- lib/chute/v2/votes.rb
Class Method Summary collapse
- .count(album_id, asset_id) ⇒ Object
- .remove_vote(album_id, asset_id) ⇒ Object
- .vote(album_id, asset_id) ⇒ Object
Class Method Details
.count(album_id, asset_id) ⇒ Object
6 7 8 |
# File 'lib/chute/v2/votes.rb', line 6 def count(album_id, asset_id) Chute::Client.get("/v2/albums/#{album_id}/assets/#{asset_id}/votes") end |
.remove_vote(album_id, asset_id) ⇒ Object
14 15 16 |
# File 'lib/chute/v2/votes.rb', line 14 def remove_vote(album_id, asset_id) Chute::Client.delete("/v2/albums/#{album_id}/assets/#{asset_id}/votes") end |
.vote(album_id, asset_id) ⇒ Object
10 11 12 |
# File 'lib/chute/v2/votes.rb', line 10 def vote(album_id, asset_id) Chute::Client.post("/v2/albums/#{album_id}/assets/#{asset_id}/votes") end |