Class: Contentstack::Client
- Inherits:
-
Object
- Object
- Contentstack::Client
- Defined in:
- lib/contentstack/client.rb
Instance Method Summary collapse
- #asset(uid) ⇒ Object
- #assets ⇒ Object
- #content_type(uid) ⇒ Object
- #content_types ⇒ Object
-
#initialize(api_key, access_token, environment) ⇒ Client
constructor
Initialize “Built.io Contentstack” Client instance.
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 |
#assets ⇒ Object
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_types ⇒ Object
13 14 15 |
# File 'lib/contentstack/client.rb', line 13 def content_types ContentType.all end |