Module: FullContact::Client::Snapshot

Included in:
FullContact::Client
Defined in:
lib/fullcontact/client/snapshot.rb

Instance Method Summary collapse

Instance Method Details

#create_snapshot(list_id, options) ⇒ Object

Public: Creates a snapshot in order to store a point-in-time backup of a contactList

list_id - id of the contact list to be backed-up options - hash containing additonal arguments

:name - Name of the snapshot

Example

response = FullContact.create_snapshot(list_id, {:name => 'foo'})
response.result now contains the snapshot name and timestamp


14
15
16
# File 'lib/fullcontact/client/snapshot.rb', line 14

def create_snapshot(list_id, options)
  post("contactList/#{list_id}/snapshot", options)
end

#list_snapshots(list_id) ⇒ Object

Public: List all snapshots associated with a contact list

list_id - id of the contact list for which snapshots need to be fetched

Example

response = FullContact.list_snapshots(list_id)
response.snapshots gives a list of snapshot names


26
27
28
# File 'lib/fullcontact/client/snapshot.rb', line 26

def list_snapshots(list_id)
  get("contactList/#{list_id}/snapshot")
end