Class: WCC::Contentful::SimpleClient
- Inherits:
-
Object
- Object
- WCC::Contentful::SimpleClient
- Defined in:
- lib/wcc/contentful/simple_client.rb,
lib/wcc/contentful/simple_client/response.rb
Direct Known Subclasses
Defined Under Namespace
Classes: ApiError, Cdn, Management, NotFoundError, Response, SyncResponse
Instance Method Summary collapse
- #get(path, query = {}) ⇒ Object
-
#initialize(api_url:, space:, access_token:, **options) ⇒ SimpleClient
constructor
A new instance of SimpleClient.
Constructor Details
#initialize(api_url:, space:, access_token:, **options) ⇒ SimpleClient
Returns a new instance of SimpleClient.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/wcc/contentful/simple_client.rb', line 9 def initialize(api_url:, space:, access_token:, **) @api_url = URI.join(api_url, '/spaces/', space + '/') @space = space @access_token = access_token @get_http = [:override_get_http] if [:override_get_http].present? @options = @query_defaults = {} @query_defaults[:locale] = @options[:default_locale] if @options[:default_locale] end |