Module: DBLista::List::Bot
- Defined in:
- lib/dblista/list/bot.rb
Overview
Bot lists
Class Method Summary collapse
-
.all ⇒ Array
Fetches all bots.
-
.premium(page = 0, limit = 10) ⇒ Hash
Fetches premium bots.
-
.rejected ⇒ Hash
Fetches rejected bots.
-
.search(query) ⇒ Hash
Bot search.
-
.top(page = 0, limit = 10) ⇒ Hash
Fetches top bots.
-
.unverified ⇒ Hash
Fetches unverified bots.
Class Method Details
.all ⇒ Array
Fetches all bots
54 55 56 |
# File 'lib/dblista/list/bot.rb', line 54 def self.all DBLista::List::Bot.top(0, 100_000_000) end |
.premium(page = 0, limit = 10) ⇒ Hash
Fetches premium bots
31 32 33 34 35 |
# File 'lib/dblista/list/bot.rb', line 31 def self.premium(page = 0, limit = 10) DBLista._page_integer page DBLista._limit_integer limit DBLista._get("/bots/list/premium/#{page}?limit=#{limit}") end |
.rejected ⇒ Hash
Fetches rejected bots
47 48 49 |
# File 'lib/dblista/list/bot.rb', line 47 def self.rejected DBLista._get('/bots/list/rejected') end |
.search(query) ⇒ Hash
Bot search
62 63 64 65 66 |
# File 'lib/dblista/list/bot.rb', line 62 def self.search(query) raise DBLista::Error, DBLista::Errors::QUERY_NOT_PROVIDED unless query DBLista._get("/bots/search/#{CGI.escape query.to_s}") end |
.top(page = 0, limit = 10) ⇒ Hash
Fetches top bots
20 21 22 23 24 |
# File 'lib/dblista/list/bot.rb', line 20 def self.top(page = 0, limit = 10) DBLista._page_integer page DBLista._limit_integer limit DBLista._get("/bots/list/top/#{page}?limit=#{limit}") end |
.unverified ⇒ Hash
Fetches unverified bots
40 41 42 |
# File 'lib/dblista/list/bot.rb', line 40 def self.unverified DBLista._get('/bots/list/unverified') end |