Version 1.6 - Updated on 03/23/2017
#initialize(session) ⇒ Contact
Returns a new instance of Contact
def initialize(session)
# Instance variables
@session = session
end
contacts
#contacts(query, sort, page, count) ⇒ Object
Give contact information of the user
Arguments:
Returns:
def contacts(query,sort,page,count)
params = {
"query" => query,
"sort" => sort,
"page" => page,
"count" => count
}
response = @session.do_get "contacts", params
Sdk::parse_response(response)
end
createContact
createContact(contactsdata)
Creates a new contact.
contactsdata
- contact data in the json format.Returns:
def createContact(contactsdata)
params = contactsdata
headers = {'Content-Type' => 'application/json'}
response = @session.do_post "contacts", params, headers
Sdk::parse_response(response, raw=true)
end
deleteContact
deleteContact(contactID)
Deletes specified contact.
contactID
- ID of the contact
def deleteContact(contactID)
response = @session.do_delete_without_params "contacts/#{contactID}"
Sdk::parse_response(response, raw=true)
end
updateContact
updateContact(contactID, contact_updateddata)
Updates specified contact.
contactID
- ID of the contactcontactsdata
- data to be updated in json format
def updateContact(contactID,contact_updateddata)
params = contact_updateddata
headers = {'Content-Type' => 'application/json'}
response = @session.do_put "contacts/#{contactID}", params, headers
Sdk::parse_response(response,raw=true)
end
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.