def test_getAccountThroughProxy(self): proxies = { "http": "https://127.0.0.1:8088", "https": "https://127.0.0.1:8089" } client = CallfireClient('api-login', 'api-password', {'proxies': proxies}) account = client.me.getAccount().result() print(account) self.assertGreater(account.id, 0)
from callfire.client import CallfireClient client = CallfireClient('api-login', 'api-password') response = client.contacts.createContactList( body={ 'name': 'My Contact List', # choose one of available source of contacts: array of contact objects, # existing contacts (ids) or array of numbers 'contacts': [{ 'firstName': 'Alice', 'lastName': 'Moore', 'homePhone': '12135551126' }, { 'firstName': 'Bob', 'lastName': 'Smith', 'homePhone': '12135551127', 'properties': { 'age': 30 } }], # add existing contacts to list # contactIds: [ # 800634185003, # 800734186003, # 800834187003, # 800984185003 # ], # add phone numbers to list # contactNumbers: [ # '12132212384',
from callfire.client import CallfireClient client = CallfireClient('account-login', 'account-password') client.me.deleteApiCredential(id=425836003)
def test_getAccount(self): client = CallfireClient('api-login', 'api-password') account = client.me.getAccount().result() print(account) self.assertGreater(account.id, 0)