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

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

Constant Summary

Constants inherited from WCC::Contentful::SimpleClient

ADAPTERS

Instance Attribute Summary

Attributes inherited from WCC::Contentful::SimpleClient

#api_url, #space

Instance Method Summary collapse

Methods inherited from Cdn

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

Methods inherited from WCC::Contentful::SimpleClient

#get, load_adapter

Constructor Details

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

Returns a new instance of Preview.



187
188
189
190
191
192
193
194
# File 'lib/wcc/contentful/simple_client.rb', line 187

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

Instance Method Details

#client_typeObject



196
197
198
# File 'lib/wcc/contentful/simple_client.rb', line 196

def client_type
  'preview'
end