Class: Podio::Embed
- Inherits:
-
ActivePodio::Base
- Object
- ActivePodio::Base
- Podio::Embed
- Defined in:
- lib/podio/models/embed.rb
Overview
Instance Attribute Summary
Attributes inherited from ActivePodio::Base
Class Method Summary collapse
-
.create(url, mode = 'immediate') ⇒ Object
mode: immediate or delayed.
- .find(id) ⇒ Object
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(url, mode = 'immediate') ⇒ Object
mode: immediate or delayed
22 23 24 25 26 27 28 |
# File 'lib/podio/models/embed.rb', line 22 def create(url, mode = 'immediate') response = Podio.connection.post do |req| req.url '/embed/' req.body = {:url => url, :mode => mode } end member response.body end |
.find(id) ⇒ Object
30 31 32 |
# File 'lib/podio/models/embed.rb', line 30 def find(id) member Podio.connection.get("/embed/#{id}").body end |