class ListCordRB
All ListCordRB
functionality, whether extended or just here.
Attributes
api[RW]
@return [String] the api key.
bot[R]
id[RW]
@return [Integer] the ID.
stats[R]
Public Class Methods
new(apikey, id)
click to toggle source
Initialize a new ListCord instance, via an api-key. @param apikey [String] API Key of the bot, received from the ListCord API doc site. @param id [Integer, String] Integer/String of your bot's id.
# File lib/listcordrb.rb, line 10 def initialize(apikey, id) @api = apikey @id = id makestats end
Public Instance Methods
getbots(query, sort = 'votes', limit = 1, page = 1)
click to toggle source
Find a bot. Initialize the get bots @param query [String] Name of the bot. @param sort [String] Type of sort, can be votes, servers, newest, or invites, default votes. @param limit [Integer] amount of bots to return. Max 10, default 1. @param page [Integer] page of bots, takes limit and mulitplies by this.
# File lib/listcordrb.rb, line 47 def getbots(query, sort = 'votes', limit = 1, page = 1) GetBots.new(query, sort, limit, page) end
loadbot(id)
click to toggle source
Load a bot. @param id [Integer, String] Integer/String ID of the bot you're requesting.
# File lib/listcordrb.rb, line 37 def loadbot(id) @bot = Bot.new(id) end
makestats()
click to toggle source
Initialize Stats
# File lib/listcordrb.rb, line 17 def makestats @stats = Stats.new(@api, @id) end