Module: DList::User::Voting
- Included in:
- Client
- Defined in:
- lib/dblista/user/voting.rb
Overview
User client - voting
Instance Method Summary collapse
-
#vote(id, type = :bot) ⇒ Boolean
Votes for a selected bot/server.
Instance Method Details
#vote(id, type = :bot) ⇒ Boolean
Votes for a selected bot/server
11 12 13 14 15 16 17 |
# File 'lib/dblista/user/voting.rb', line 11 def vote(id, type = :bot) DList._validate_id id raise DList::Error, DList::Errors::TYPE_NOT_ALLOWED unless DList::User::Client::ALLOWED_TYPES.include?(type) DList._post("/#{type}s/#{id}/vote", nil, @token) true end |