Class: ForemLite::Client
- Inherits:
-
Object
- Object
- ForemLite::Client
- Includes:
- HTTParty
- Defined in:
- lib/forem_lite/client.rb
Instance Method Summary collapse
-
#article(id) ⇒ Object
Retrieve a single published article given its id.
-
#articles ⇒ Array<Object>
Retrieve a list of articles.
-
#initialize(api_key = nil) ⇒ Client
constructor
Create a new client object with your Forem API key.
Constructor Details
#initialize(api_key = nil) ⇒ Client
Create a new client object with your Forem API key.
11 12 13 |
# File 'lib/forem_lite/client.rb', line 11 def initialize(api_key = nil) self.class.[:headers] = {"api-key" => api_key} if api_key end |