Class: Contentful::Management::Snapshot

Inherits:
Object
  • Object
show all
Includes:
Resource, Resource::EnvironmentAware, Resource::Refresher, Resource::SystemProperties
Defined in:
lib/contentful/management/snapshot.rb

Overview

Resource class for Snapshot.

See Also:

  • https://www.contentful.com/developers/docs/references/content-management-api/#/reference/snapshots

Instance Attribute Summary

Attributes included from Resource::SystemProperties

#sys

Attributes included from Resource

#client, #default_locale, #properties, #raw_object, #request

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Resource::EnvironmentAware

#environment_id

Methods included from Resource::Refresher

#reload

Methods included from Resource

#array?, #environment_id, #fields, #nested_locale_fields?, #resource?, #sys

Class Method Details

.all(client, space_id, environment_id, resource_id, resource_type = 'entries', params = {}) ⇒ Contentful::Management::Array<Contentful::Management::Snapshot>

Gets all snapshots for a resource

rubocop:disable Metrics/ParameterLists

Parameters:

  • client (Contentful::Management::Client)
  • space_id (String)
  • environment_id (String)
  • resource_id (String)
  • resource_type (String) (defaults to: 'entries')

Returns:



41
42
43
# File 'lib/contentful/management/snapshot.rb', line 41

def self.all(client, space_id, environment_id, resource_id, resource_type = 'entries', params = {})
  ClientSnapshotMethodsFactory.new(client, space_id, environment_id, resource_type).all(resource_id, params)
end

.createObject

Not supported



60
61
62
# File 'lib/contentful/management/snapshot.rb', line 60

def self.create(*)
  fail 'Not supported'
end

.find(client, space_id, environment_id, resource_id, snapshot_id, resource_type = 'entries') ⇒ Contentful::Management::Snapshot

Gets a snapshot by ID

Parameters:

  • client (Contentful::Management::Client)
  • space_id (String)
  • environment_id (String)
  • resource_id (String)
  • snapshot_id (String)
  • resource_type (String) (defaults to: 'entries')

Returns:



55
56
57
# File 'lib/contentful/management/snapshot.rb', line 55

def self.find(client, space_id, environment_id, resource_id, snapshot_id, resource_type = 'entries')
  ClientSnapshotMethodsFactory.new(client, space_id, environment_id, resource_type).find(resource_id, snapshot_id)
end

Instance Method Details

#destroyObject

Not supported



84
85
86
# File 'lib/contentful/management/snapshot.rb', line 84

def destroy
  fail 'Not supported'
end

#updateObject

Not supported



89
90
91
# File 'lib/contentful/management/snapshot.rb', line 89

def update(*)
  fail 'Not supported'
end