Class: Podio::ItemDiff

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

Instance Attribute Summary

Attributes inherited from ActivePodio::Base

#attributes, #error_code, #error_message, #error_parameters, #error_propagate

Class Method Summary collapse

Methods inherited from ActivePodio::Base

#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, handle_api_errors_for, has_many, has_one, #hash, #initialize, list, member, #new_record?, #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



12
13
14
# File 'lib/podio/models/item_diff.rb', line 12

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



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

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