Class: Podio::ItemDiff

Inherits:
ActivePodio::Base show all
Defined in:
lib/podio/models/item_diff.rb

Overview

Instance Attribute Summary

Attributes inherited from ActivePodio::Base

#attributes

Class Method Summary collapse

Methods inherited from ActivePodio::Base

#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, has_many, has_one, #hash, #initialize, #initialize_attributes, klass_from_string, list, member, #new_record?, output_attribute_as_json, #parent_model, #persisted?, property, #to_param

Constructor Details

This class inherits a constructor from ActivePodio::Base

Class Method Details

.find_by_item_and_revisions(item_id, revision_from_id, revision_to_id) ⇒ Object



15
16
17
# File 'lib/podio/models/item_diff.rb', line 15

def find_by_item_and_revisions(item_id, revision_from_id, revision_to_id)
  list Podio.connection.get("/item/#{item_id}/revision/#{revision_from_id}/#{revision_to_id}").body
end

.revert(item_id, revision_id) ⇒ Object



20
21
22
# File 'lib/podio/models/item_diff.rb', line 20

def revert(item_id, revision_id)
  Podio.connection.delete("/item/#{item_id}/revision/#{revision_id}").body
end