Class: Contentstack::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/contentstack/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key, access_token, environment) ⇒ Client

Initialize “Built.io Contentstack” Client instance



8
9
10
# File 'lib/contentstack/client.rb', line 8

def initialize(api_key, access_token, environment)
  API.init_api(api_key, access_token, environment)
end

Instance Method Details

#asset(uid) ⇒ Object



25
26
27
# File 'lib/contentstack/client.rb', line 25

def asset(uid)
  Asset.new(uid)
end

#assetsObject



21
22
23
# File 'lib/contentstack/client.rb', line 21

def assets
  AssetCollection.new
end

#content_type(uid) ⇒ Object



17
18
19
# File 'lib/contentstack/client.rb', line 17

def content_type(uid)
  ContentType.new({uid: uid})
end

#content_typesObject



13
14
15
# File 'lib/contentstack/client.rb', line 13

def content_types
  ContentType.all
end