Class: ReviewsCatcher::Client
- Inherits:
-
Object
- Object
- ReviewsCatcher::Client
- Defined in:
- lib/reviews_catcher/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
Instance Method Summary collapse
- #account ⇒ Object
-
#initialize(app_id: 'my_app_id', api_key: 'my_api_key') ⇒ Client
constructor
A new instance of Client.
- #reviews ⇒ Object
Constructor Details
#initialize(app_id: 'my_app_id', api_key: 'my_api_key') ⇒ Client
Returns a new instance of Client.
6 7 8 9 10 11 12 13 |
# File 'lib/reviews_catcher/client.rb', line 6 def initialize(app_id: 'my_app_id', api_key: 'my_api_key') @app_id = app_id @api_key = api_key validate_credentials! @base_url = build_base_url end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/reviews_catcher/client.rb', line 4 def api_key @api_key end |
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
4 5 6 |
# File 'lib/reviews_catcher/client.rb', line 4 def app_id @app_id end |
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
4 5 6 |
# File 'lib/reviews_catcher/client.rb', line 4 def base_url @base_url end |
Instance Method Details
#account ⇒ Object
15 16 17 |
# File 'lib/reviews_catcher/client.rb', line 15 def account @account ||= ReviewsCatcher::Account.new(self) end |
#reviews ⇒ Object
19 20 21 |
# File 'lib/reviews_catcher/client.rb', line 19 def reviews @reviews ||= ReviewsCatcher::Reviews.new(self) end |