Account API Client

class go_http.account.AccountApiClient(auth_token, api_url=None, session=None)

Client for Vumi Go’s JSON-RPC based account, conversations, channel and routing API.

Parameters:
  • auth_token (str) – An OAuth 2 access token. NOTE: This will be replaced by a proper authentication system at some point.
  • api_url (str) – The full URL of the HTTP API. Defaults to https://go.vumi.org/api/v1/go.
  • session (requests.Session) – Requests session to use for HTTP requests. Defaults to a new session.
campaigns()

Return a list of campaigns accessible by the account.

Note: The server-side implementation of this API method is a stub. It always returns a single campaign whose name is ‘Your Campaign’ and whose key is the account key.

channels(campaign_id)

Return a list of channels for the campaign.

Parameters:campaign_id (str) – The campaign or account id.
conversations(campaign_id)

Return a list of conversations for the campaign.

Parameters:campaign_id (str) – The campaign or account id.
routers(campaign_id)

Return a list of routers for the campaign.

Parameters:campaign_id (str) – The campaign or account id.
routing_entries(campaign_id)

Return a list of routing entries for the campaign.

Parameters:campaign_id (str) – The campaign or account id.
routing_table(campaign_id)

Return the complete routing table for the campaign.

Parameters:campaign_id (str) – The campaign or account id.
update_routing_table(campaign_id, routing_table)

Update the routing table for the campaign.

Parameters:
  • campaign_id (str) – The campaign or account id.
  • routing_table (dict) – The complete new routing table.