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, #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?, #default_locale, #environment_id, #fields, #nested_locale_fields?, #resource?, #save, #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:



43
44
45
# File 'lib/contentful/management/snapshot.rb', line 43

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



62
63
64
# File 'lib/contentful/management/snapshot.rb', line 62

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:



57
58
59
# File 'lib/contentful/management/snapshot.rb', line 57

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



86
87
88
# File 'lib/contentful/management/snapshot.rb', line 86

def destroy
  fail 'Not supported'
end

#updateObject

Not supported



91
92
93
# File 'lib/contentful/management/snapshot.rb', line 91

def update(*)
  fail 'Not supported'
end