Module: DBLista::User::Boosting
- Included in:
- Client
- Defined in:
- lib/dblista/user/boosting.rb
Overview
User client - boosting
Instance Method Summary collapse
-
#boost(id, type = :bot) ⇒ Boolean
Boosts selected bot/server.
-
#delete_boost(id, type = :bot) ⇒ Boolean
Removes boost from a selected bot/server.
Instance Method Details
#boost(id, type = :bot) ⇒ Boolean
Boosts selected bot/server
11 12 13 14 15 16 17 |
# File 'lib/dblista/user/boosting.rb', line 11 def boost(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}/boost", nil, @token) true end |
#delete_boost(id, type = :bot) ⇒ Boolean
Removes boost from a selected bot/server
24 25 26 27 28 29 30 |
# File 'lib/dblista/user/boosting.rb', line 24 def delete_boost(id, type = :bot) DBLista._validate_id id raise DBLista::Error, DBLista::Errors::TYPE_NOT_ALLOWED unless DBLista::User::Client::ALLOWED_TYPES.include?(type) DBLista._delete("/#{type}s/#{id}/boost", nil, @token) true end |