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