class Podio::Profile
Serves as the base for Contacts and Organization Contacts @see developers.podio.com/doc/contacts
Public Class Methods
# File lib/podio/models/profile.rb, line 42 def all(options={}) options[:exclude_self] = (options[:exclude_self] == false ? "0" : "1" ) list Podio.connection.get { |req| req.url("/contact/", options) }.body end
@see developers.podio.com/doc/contacts/create-space-contact-65590
# File lib/podio/models/profile.rb, line 130 def create_space_contact(space_id, attributes) response = Podio.connection.post do |req| req.url "/contact/space/#{space_id}/" req.body = attributes end response.body end
@see developers.podio.com/doc/contacts/delete-contact-s-60560
# File lib/podio/models/profile.rb, line 140 def delete_contact(profile_id) Podio.connection.delete("/contact/#{profile_id}").body end
# File lib/podio/models/profile.rb, line 50 def find(profile_id, options = {}) result = Podio.connection.get do |req| req.url("/contact/#{profile_id}/v2", options) end.body if result.is_a?(Array) return list result else return member result end end
@see developers.podio.com/doc/contacts/get-linked-account-contacts-6214688
# File lib/podio/models/profile.rb, line 83 def find_all_for_linked_account(id, options={}) list Podio.connection.get { |req| req.url("/contact/linked_account/#{id}", options) }.body end
@see developers.podio.com/doc/contacts/get-organization-contacts-22401
# File lib/podio/models/profile.rb, line 63 def find_all_for_org(org_id, options={}) options[:view] ||= 'full' options[:exclude_self] = (options[:exclude_self] == false ? "0" : "1" ) list Podio.connection.get { |req| req.url("/contact/org/#{org_id}", options) }.body end
@see developers.podio.com/doc/contacts/get-space-contacts-22414
# File lib/podio/models/profile.rb, line 73 def find_all_for_space(space_id, options={}) options[:view] ||= 'full' options[:exclude_self] = (options[:exclude_self] == false ? "0" : "1" ) list Podio.connection.get { |req| req.url("/contact/space/#{space_id}", options) }.body end
@see developers.podio.com/doc/contacts/get-user-contact-60514
# File lib/podio/models/profile.rb, line 99 def find_all_for_users(user_ids) list Podio.connection.get("/contact/user/#{user_ids}").body end
# File lib/podio/models/profile.rb, line 89 def find_for_org(org_id) member Podio.connection.get("/org/#{org_id}/billing").body end
@see developers.podio.com/doc/contacts/get-user-contact-60514
# File lib/podio/models/profile.rb, line 94 def find_for_user(user_id) member Podio.connection.get("/contact/user/#{user_id}").body end
@see developers.podio.com/doc/contacts/get-skills-1346872
# File lib/podio/models/profile.rb, line 123 def skills(options) Podio.connection.get { |req| req.url("/contact/skill/", options) }.body end
# File lib/podio/models/profile.rb, line 108 def totals_by_org Podio.connection.get("/contact/totals/").body end
@see developers.podio.com/doc/contacts/get-contact-totals-60467
# File lib/podio/models/profile.rb, line 118 def totals_by_org_and_space Podio.connection.get("/contact/totals/v2/").body end
@see developers.podio.com/doc/contacts/get-space-contact-totals-67508
# File lib/podio/models/profile.rb, line 113 def totals_by_space_v2(space_id) Podio.connection.get("/contact/space/#{space_id}/totals/space").body end
@see developers.podio.com/doc/contacts/update-contact-60556
# File lib/podio/models/profile.rb, line 145 def update_contact(profile_id, attributes) response = Podio.connection.put do |req| req.url "/contact/#{profile_id}" req.body = attributes end response.body end
@see developers.podio.com/doc/contacts/get-vcard-213496
# File lib/podio/models/profile.rb, line 104 def vcard(profile_id) Podio.connection.get("/contact/#{profile_id}/vcard").body end