Class: Podio::Search
Overview
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
.globally(words, attributes = {}) ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/podio/models/search.rb', line 29
def globally(words, attributes={})
attributes[:query] = words
response = Podio.connection.post do |req|
req.url "/search/"
req.body = attributes
end
list response.body
end
|
.in_app(app_id, words, attributes = {}) ⇒ Object
51
52
53
54
55
56
57
58
59
|
# File 'lib/podio/models/search.rb', line 51
def in_app(app_id, words, attributes={})
attributes[:query] = words
response = Podio.connection.post do |req|
req.url "/search/app/#{app_id}/"
req.body = attributes
end
list response.body
end
|
.in_org(org_id, words) ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/podio/models/search.rb', line 18
def in_org(org_id, words)
attributes[:query] = words
response = Podio.connection.post do |req|
req.url "/search/org/#{org_id}/"
req.body = attributes
end
list response.body
end
|
.in_space(space_id, words, attributes = {}) ⇒ Object
40
41
42
43
44
45
46
47
48
|
# File 'lib/podio/models/search.rb', line 40
def in_space(space_id, words, attributes={})
attributes[:query] = words
response = Podio.connection.post do |req|
req.url "/search/space/#{space_id}/"
req.body = attributes
end
list response.body
end
|
.rank(search_id, rank) ⇒ Object
61
62
63
|
# File 'lib/podio/models/search.rb', line 61
def rank(search_id, rank)
Podio.connection.post("/search/#{search_id}/#{rank}/clicked").status
end
|