Class: DBots::Poster
- Inherits:
-
Object
- Object
- DBots::Poster
- Defined in:
- lib/dbots/poster.rb
Overview
A class that posts server count to listing site(s).
Instance Attribute Summary collapse
-
#api_keys ⇒ Hash
(also: #tokens, #keys)
The API keys that the poster is using.
-
#client_id ⇒ String
The client ID used for posting to a service.
Instance Method Summary collapse
-
#initialize(client_id, api_keys: {}) ⇒ Poster
constructor
A new instance of Poster.
Constructor Details
#initialize(client_id, api_keys: {}) ⇒ Poster
Returns a new instance of Poster.
13 14 15 16 |
# File 'lib/dbots/poster.rb', line 13 def initialize(client_id, api_keys: {}) @client_id = client_id.respond_to?(:resolve_id) ? client_id.resolve_id.to_s : client_id.to_s @api_keys = api_keys end |
Instance Attribute Details
#api_keys ⇒ Hash Also known as: tokens, keys
Returns the API keys that the poster is using.
5 6 7 |
# File 'lib/dbots/poster.rb', line 5 def api_keys @api_keys end |
#client_id ⇒ String
Returns the client ID used for posting to a service.
10 11 12 |
# File 'lib/dbots/poster.rb', line 10 def client_id @client_id end |