Class: DBots::Service
- Inherits:
-
Object
- Object
- DBots::Service
- Defined in:
- lib/dbots/data.rb,
lib/dbots/lists/discordbotsgg.rb
Overview
Represents a basic service.
Direct Known Subclasses
Defined Under Namespace
Classes: DiscordBotsGG
Constant Summary collapse
- BASE_URL =
''.freeze
- AUTH_HEADER =
'Authorization'.freeze
Instance Attribute Summary collapse
-
#token ⇒ String?
(also: #key, #api_key)
The token that will be used for the service.
Instance Method Summary collapse
-
#initialize(token = nil) ⇒ Service
constructor
A new instance of Service.
- #token? ⇒ Boolean
Constructor Details
#initialize(token = nil) ⇒ Service
Returns a new instance of Service.
18 19 20 |
# File 'lib/dbots/data.rb', line 18 def initialize(token = nil) @token = token end |
Instance Attribute Details
#token ⇒ String? Also known as: key, api_key
Returns the token that will be used for the service.
13 14 15 |
# File 'lib/dbots/data.rb', line 13 def token @token end |
Instance Method Details
#token? ⇒ Boolean
22 23 24 |
# File 'lib/dbots/data.rb', line 22 def token? @token != nil end |