Class: Podio::Pin
Instance Attribute Summary
#attributes
Class Method Summary
collapse
#==, #[], #[]=, #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
Class Method Details
.create(ref_type, ref_id) ⇒ Object
15
16
17
|
# File 'lib/podio/models/pin.rb', line 15
def create(ref_type, ref_id)
new(Podio.connection.post("/pin/#{ref_type}/#{ref_id}").body)
end
|
.delete(ref_type, ref_id) ⇒ Object
23
24
25
|
# File 'lib/podio/models/pin.rb', line 23
def delete(ref_type, ref_id)
Podio.connection.delete("/pin/#{ref_type}/#{ref_id}")
end
|
.find_all(query = {}) ⇒ Object
11
12
13
|
# File 'lib/podio/models/pin.rb', line 11
def find_all(query = {})
Podio.connection.get("/pin/?#{query.to_param}").body.map(&method(:new))
end
|
.reorder(ref_type, ref_id, priority) ⇒ Object
19
20
21
|
# File 'lib/podio/models/pin.rb', line 19
def reorder(ref_type, ref_id, priority)
Podio.connection.post("/pin/#{ref_type}/#{ref_id}/reorder", priority)
end
|