class Podio::Search

@see developers.podio.com/doc/search

Public Class Methods

globally(words, attributes={}) click to toggle source

@see developers.podio.com/doc/search/search-globally-22488

# 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={}) click to toggle source

@see developers.podio.com/doc/search/search-in-app-4234651

# 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) click to toggle source

@see developers.podio.com/doc/search/search-in-organization-22487

# 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={}) click to toggle source

@see developers.podio.com/doc/search/search-in-space-22479

# 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) click to toggle source
# File lib/podio/models/search.rb, line 61
def rank(search_id, rank)
  Podio.connection.post("/search/#{search_id}/#{rank}/clicked").status
end