Class: Blackerz::Bots
- Inherits:
-
Object
- Object
- Blackerz::Bots
- Defined in:
- lib/blackerz/sdk.rb
Instance Attribute Summary collapse
-
#AuthV1 ⇒ Object
Returns the value of attribute AuthV1.
-
#BotID ⇒ Object
Returns the value of attribute BotID.
Class Method Summary collapse
-
.bot_data(bot_id: String) ⇒ Object
class static method, Bots.bot_data() -> hash.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(botID, authv1) ⇒ Bots
constructor
A new instance of Bots.
Constructor Details
#initialize(botID, authv1) ⇒ Bots
Returns a new instance of Bots.
20 21 22 23 |
# File 'lib/blackerz/sdk.rb', line 20 def initialize(botID, authv1) self.BotID = botID self.AuthV1 = authv1 end |
Instance Attribute Details
#AuthV1 ⇒ Object
Returns the value of attribute AuthV1.
8 9 10 |
# File 'lib/blackerz/sdk.rb', line 8 def AuthV1 @AuthV1 end |
#BotID ⇒ Object
Returns the value of attribute BotID.
8 9 10 |
# File 'lib/blackerz/sdk.rb', line 8 def BotID @BotID end |
Class Method Details
.bot_data(bot_id: String) ⇒ Object
class static method, Bots.bot_data() -> hash
11 12 13 14 15 16 17 18 |
# File 'lib/blackerz/sdk.rb', line 11 def self.bot_data(bot_id: String) res = HTTP.get("https://blackerz.herokuapp.com/api/v1/bots/" + bot_id) unless res.code == 200 nil end data = res.parse data end |