module DList::User::Boosting
User
client - boosting
Public Instance Methods
boost(id, type = :bot)
click to toggle source
Boosts selected bot/server
@param id [Integer] entity ID @param type [Symbol] type of entity (bot/server) @return [Boolean] true if operation succeded
# 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)
click to toggle source
Removes boost from a selected bot/server
@param id [Integer] entity ID @param type [Symbol] type of entity (bot/server) @return [Boolean] true if operation succeded
# 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