Class: Podio::Reference
- Inherits:
-
ActivePodio::Base
- Object
- ActivePodio::Base
- Podio::Reference
- Defined in:
- lib/podio/models/reference.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, #initialize_attributes, list, member, #new_record?, output_attribute_as_json, #persisted?, property, #to_param
Constructor Details
This class inherits a constructor from ActivePodio::Base
Class Method Details
.find(ref_type, ref_id, options = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/podio/models/reference.rb', line 14 def find(ref_type, ref_id, = {}) member Podio.connection.get { |req| req.url("/reference/#{ref_type}/#{ref_id}", ) }.body end |
.search(target, query, limit) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/podio/models/reference.rb', line 20 def search(target, query, limit) response = Podio.connection.post do |req| req.url "/reference/search" req.body = { :target => target, :text => query, :limit => limit } end response.body end |