Overview

-- restructuredtext --

Class iContact

Methods

get_accounts_folders()
Returns the accountIds and folderIds for the entire account
GET(method, args, kwargs)

Does a GET request to API at the url:

UrI/accountId/c/folderId/method/arg[0]/arg[1]/arg[2]?kwarg_key[0]=kwarg_value[1]&etc.

DELETE(method, args, kwargs)
Basically the same as GET except it deletes the target.
PUT(data, method, args, kwargs)
Does a PUT request to the API with a url built like GETs. data must be a json string(probably will get chagned to an object later)
POST(data, method, args, kwargs)
Basically the same as PUT

Example

from pyContact import iContact
account = {
    "host": "app.icontact.com",
    "user": "yourid",
    "appid": "appidXXXXXXXXXXXXXXXXXXX",
    "password": "password",
}
contact = iContact(account)
contact.account = XXXXX
contact.folder = XXXX
print contact.GET('contacts')
print contact.GET('contacts', listId='XXXXXXX')