lib/wcc/contentful/simple_client.rb in wcc-contentful-1.4.0.rc1 vs lib/wcc/contentful/simple_client.rb in wcc-contentful-1.4.0.rc2
- old
+ new
@@ -34,11 +34,10 @@
# @param [String] space The Space ID to access
# @param [String] access_token A Contentful Access Token to be sent in the Authorization header
# @param [Hash] options The remaining optional parameters, defined below
# @option options [Symbol, Object] connection The Faraday connection to use to make requests.
# Auto-discovered based on what gems are installed if this is not provided.
- # @option options [String] default_locale The locale query param to set by default.
# @option options [String] environment The contentful environment to access. Defaults to 'master'.
# @option options [Boolean] no_follow_redirects If true, do not follow 300 level redirects.
# @option options [Number] rate_limit_wait_timeout The maximum time to block the thread waiting
# on a rate limit response. By default will wait for one 429 and then fail on the second 429.
def initialize(api_url:, space:, access_token:, **options)
@@ -49,10 +48,9 @@
@adapter = SimpleClient.load_adapter(options[:connection])
@options = options
@_instrumentation = @options[:instrumentation]
@query_defaults = {}
- @query_defaults[:locale] = @options[:default_locale] if @options[:default_locale]
# default 1.5 so that we retry one time then fail if still rate limited
# https://www.contentful.com/developers/docs/references/content-preview-api/#/introduction/api-rate-limits
@rate_limit_wait_timeout = @options[:rate_limit_wait_timeout] || 1.5
return unless options[:environment].present?