module DList::List::Bot
Bot
lists
Public Class Methods
all()
click to toggle source
Fetches all bots
@return [Array] array of raw bot data from DList
# File lib/dblista/list/bot.rb, line 62 def self.all DList._cache(:botsall) do DList._get('/bots/list/top/0?limit=1000000') end end
rejected()
click to toggle source
Fetches rejected bots
@return [Hash] raw data from DList
# File lib/dblista/list/bot.rb, line 53 def self.rejected DList._cache(:botsrejected) do DList._get('/bots/list/rejected') end end
search(query)
click to toggle source
Bot
search
@param query [String] query search @return [Hash] raw data from DList
# File lib/dblista/list/bot.rb, line 72 def self.search(query) raise DList::Error, DList::Errors::QUERY_NOT_PROVIDED unless query DList._cache("botsearch#{query}") do DList._get("/bots/search/#{CGI.escape query.to_s}") end end
top(page = 0, limit = 10)
click to toggle source
Fetches top bots
@param page [Integer] page @param limit [Integer] limit of bots per page @return [Hash] raw data from DList
# File lib/dblista/list/bot.rb, line 20 def self.top(page = 0, limit = 10) DList._page_integer page DList._limit_integer limit DList._cache("botstop#{page}-#{limit}") do DList._get("/bots/list/top/#{page}?limit=#{limit}") end end
unverified()
click to toggle source
Fetches unverified bots
@return [Hash] raw data from DList
# File lib/dblista/list/bot.rb, line 44 def self.unverified DList._cache(:botsunverified) do DList._get('/bots/list/unverified') end end