Class: WCC::Contentful::SimpleClient::Management

Inherits:
WCC::Contentful::SimpleClient show all
Defined in:
lib/wcc/contentful/simple_client.rb

Constant Summary

Constants inherited from WCC::Contentful::SimpleClient

ADAPTERS

Instance Method Summary collapse

Methods inherited from WCC::Contentful::SimpleClient

#get, load_adapter

Constructor Details

#initialize(space:, management_token:, **options) ⇒ Management

Returns a new instance of Management.



165
166
167
168
169
170
171
172
# File 'lib/wcc/contentful/simple_client.rb', line 165

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

Instance Method Details

#client_typeObject



174
175
176
# File 'lib/wcc/contentful/simple_client.rb', line 174

def client_type
  'management'
end

#content_types(**query) ⇒ Object



178
179
180
181
# File 'lib/wcc/contentful/simple_client.rb', line 178

def content_types(**query)
  resp = get('content_types', query)
  resp.assert_ok!
end