Class: WCC::Contentful::SimpleClient::Preview

Inherits:
Cdn show all
Defined in:
lib/wcc/contentful/simple_client/preview.rb

Constant Summary

Constants inherited from WCC::Contentful::SimpleClient

ADAPTERS

Instance Attribute Summary

Attributes inherited from WCC::Contentful::SimpleClient

#api_url, #space

Attributes included from Instrumentation

#_instrumentation

Instance Method Summary collapse

Methods inherited from Cdn

#asset, #assets, #content_types, #entries, #entry, #sync

Methods inherited from WCC::Contentful::SimpleClient

#get, load_adapter

Methods included from Instrumentation

#_instrumentation_event_prefix, instrument

Constructor Details

#initialize(space:, preview_token:, **options) ⇒ Preview

Returns a new instance of Preview.



5
6
7
8
9
10
11
12
# File 'lib/wcc/contentful/simple_client/preview.rb', line 5

def initialize(space:, preview_token:, **options)
  super(
    **options,
    api_url: options[:preview_api_url] || 'https://preview.contentful.com/',
    space: space,
    access_token: preview_token
  )
end

Instance Method Details

#client_typeObject



14
15
16
# File 'lib/wcc/contentful/simple_client/preview.rb', line 14

def client_type
  'preview'
end