Spatio.Api.Contacts (spatio_sdk v0.0.2)
API calls for all endpoints tagged Contacts.
Summary
Functions
Assign a category to a contact.
Create a contact.
Create a contact category.
Delete a contact.
Delete a category.
Fetch a contact.
List contact categories. Requires organization_id query param.
List supported contact providers (native + OAuth-connected).
List the caller's contacts (across providers).
Remove a category from a contact.
Update a contact.
Functions
@spec assign_contact_category( Tesla.Env.client(), String.t(), Spatio.Model.AssignContactCategoryRequest.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Assign a category to a contact.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):assign_contact_category_request(AssignContactCategoryRequest):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec create_contact( Tesla.Env.client(), Spatio.Model.CreateContactRequest.t(), keyword() ) :: {:ok, Spatio.Model.Contact.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create a contact.
Parameters
connection(Spatio.Connection): Connection to servercreate_contact_request(CreateContactRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Contact.t}on success{:error, Tesla.Env.t}on failure
@spec create_contact_category( Tesla.Env.client(), Spatio.Model.CreateContactCategoryRequest.t(), keyword() ) :: {:ok, Spatio.Model.ContactCategory.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create a contact category.
Parameters
connection(Spatio.Connection): Connection to servercreate_contact_category_request(CreateContactCategoryRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ContactCategory.t}on success{:error, Tesla.Env.t}on failure
@spec delete_contact(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete a contact.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec delete_contact_category(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete a category.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec get_contact(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.Contact.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Fetch a contact.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Contact.t}on success{:error, Tesla.Env.t}on failure
@spec list_contact_categories(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.ContactCategoryListResponse.t()} | {:error, Tesla.Env.t()}
List contact categories. Requires organization_id query param.
Parameters
connection(Spatio.Connection): Connection to serverorganization_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ContactCategoryListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_contact_providers( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.ContactProviderListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List supported contact providers (native + OAuth-connected).
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ContactProviderListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_contacts( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.ContactListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the caller's contacts (across providers).
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters:limit(integer())::provider(String.t)::search(String.t):
Returns
{:ok, Spatio.Model.ContactListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec unassign_contact_category(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Remove a category from a contact.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):category_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec update_contact( Tesla.Env.client(), String.t(), Spatio.Model.UpdateContactRequest.t(), keyword() ) :: {:ok, Spatio.Model.Contact.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update a contact.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):update_contact_request(UpdateContactRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Contact.t}on success{:error, Tesla.Env.t}on failure
@spec update_contact_category( Tesla.Env.client(), String.t(), Spatio.Model.UpdateContactCategoryRequest.t(), keyword() ) :: {:ok, Spatio.Model.ContactCategory.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update a category.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):update_contact_category_request(UpdateContactCategoryRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ContactCategory.t}on success{:error, Tesla.Env.t}on failure