Class: Infogram::Client
- Inherits:
-
Object
- Object
- Infogram::Client
- Defined in:
- lib/infogram/client.rb
Constant Summary collapse
- API_URL =
'https://infogr.am/service/v1'
Instance Attribute Summary collapse
-
#config(opts = {}) ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #infographics ⇒ Object
-
#initialize(api_key, api_secret) ⇒ Client
constructor
A new instance of Client.
- #themes ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize(api_key, api_secret) ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/infogram/client.rb', line 7 def initialize(api_key, api_secret) config(api_key: api_key, api_secret: api_secret) end |
Instance Attribute Details
#config(opts = {}) ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/infogram/client.rb', line 5 def config @config end |
Instance Method Details
#infographics ⇒ Object
23 24 25 |
# File 'lib/infogram/client.rb', line 23 def infographics @infographics ||= Infogram::Infographics.new(config) end |
#themes ⇒ Object
19 20 21 |
# File 'lib/infogram/client.rb', line 19 def themes @themes ||= Infogram::Themes.new(config) end |
#users ⇒ Object
27 28 29 |
# File 'lib/infogram/client.rb', line 27 def users @users ||= Infogram::Users.new(config) end |