Class: DBots::Service::DiscordBotsGG
- Inherits:
-
DBots::Service
- Object
- DBots::Service
- DBots::Service::DiscordBotsGG
- Defined in:
- lib/dbots/lists/discordbotsgg.rb
Overview
Represents the Discord Bots service.
Constant Summary collapse
- BASE_URL =
'https://discord.bots.gg/api/v1'.freeze
- ALIASES =
['discordbotsgg', 'discord.bots.gg', 'botsgg', 'bots.gg', 'dbots'].freeze
Constants inherited from DBots::Service
Instance Attribute Summary
Attributes inherited from DBots::Service
Instance Method Summary collapse
-
#get_bot(id, sanitied = false) ⇒ RestClient::Response
Gets the bot listed on this service.
-
#get_bots(query = {}) ⇒ RestClient::Response
Gets a list of bots on this service.
Methods inherited from DBots::Service
Constructor Details
This class inherits a constructor from DBots::Service
Instance Method Details
#get_bot(id, sanitied = false) ⇒ RestClient::Response
Gets the bot listed on this service.
15 16 17 18 |
# File 'lib/dbots/lists/discordbotsgg.rb', line 15 def get_bot(id, sanitied = false) id = id.respond_to?(:resolve_id) ? id.resolve_id.to_s : id.to_s get_authed("/bots/#{id}", { sanitied: sanitied }) end |
#get_bots(query = {}) ⇒ RestClient::Response
Gets a list of bots on this service.
23 24 25 26 |
# File 'lib/dbots/lists/discordbotsgg.rb', line 23 def get_bots(query = {}) id = id.respond_to?(:resolve_id) ? id.resolve_id.to_s : id.to_s get_authed("/bots/#{id}", query) end |