Class: Podio::ApplicationField

Inherits:
ActivePodio::Base show all
Defined in:
lib/podio/models/application_field.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(app_id, attributes) ⇒ Object



26
27
28
# File 'lib/podio/models/application_field.rb', line 26

def create(app_id, attributes)
  Podio.connection.post("/app/#{app_id}/field/", attributes).body['field_id']
end

.find(app_id, field_id) ⇒ Object



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

def find(app_id, field_id)
  member Podio.connection.get("/app/#{app_id}/field/#{field_id}").body
end

.update(app_id, field_id, attributes) ⇒ Object



21
22
23
# File 'lib/podio/models/application_field.rb', line 21

def update(app_id, field_id, attributes)
  Podio.connection.put("/app/#{app_id}/field/#{field_id}", attributes).body['revision']
end