Class: Podio::ExternalFile

Inherits:
ActivePodio::Base show all
Defined in:
lib/podio/models/external_file.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

.create_from_external_file_id(linked_account_id, external_file_id, preserve_permissions = false, options = {}) ⇒ Object

DEPRECATED please use FileAttachment.create_from_external_id



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/podio/models/external_file.rb', line 22

def create_from_external_file_id(, external_file_id, preserve_permissions=false, options={})
  response = Podio.client.connection.post do |req|
    req.url("/file/linked_account/#{}/", options)
    req.body = {
        :external_file_id     => external_file_id,
        :preserve_permissions => preserve_permissions
    }
  end

  member response.body
end

.find_all_for_linked_account(linked_account_id, options = {}) ⇒ Object



15
16
17
18
19
# File 'lib/podio/models/external_file.rb', line 15

def (, options={})
  list Podio.connection.get { |req|
    req.url("/file/linked_account/#{}/", options)
  }.body
end