Module: DBLista::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) DBLista._validate_id id raise DBLista::Error, DBLista::Errors::TYPE_NOT_ALLOWED unless DBLista::User::Client::ALLOWED_TYPES.include?(type) DBLista._post("/#{type}s/#{id}/vote", nil, @token) true end |