Method: Contentstack::Entry#fetch

Defined in:
lib/contentstack/entry.rb

#fetchContentstack::EntryCollection

Execute entry

Example

@entry = @stack.content_type('product').entry(entry_uid)
@entry.fetch


214
215
216
217
218
219
220
# File 'lib/contentstack/entry.rb', line 214

def fetch
  entry = API.fetch_entry(@content_type, self.fields[:uid], @query)
  setup(entry["entry"])
  @schema       = entry["schema"].symbolize_keys if entry["schema"]
  @content_type = entry["content_type"].symbolize_keys if entry["content_type"]
  self
end