View Source PlacetelAPI.Api.Contacts (placetel_api v2.0.0)
API calls for all endpoints tagged Contacts
.
Link to this section Summary
Functions
Deletes a contact Deletes a contact by its ID
Get all contacts Provides a list of all contacts
Retrieve a contact Fetches a contact by its ID
Create a contact Creates a contact
Update a contact Updates a contact for a given ID
Link to this section Functions
@spec delete_contacts_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Deletes a contact Deletes a contact by its ID
parameters
Parameters
connection
(PlacetelAPI.Connection): Connection to serverid
(integer()): Contact IDopts
(keyword): Optional parameters
returns
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure
@spec get_contacts( Tesla.Env.client(), keyword() ) :: {:ok, [PlacetelAPI.Model.Contact.t()]} | {:error, Tesla.Env.t()}
Get all contacts Provides a list of all contacts
parameters
Parameters
connection
(PlacetelAPI.Connection): Connection to serveropts
(keyword): Optional parameters:"filter[speeddial]"
(integer())::"filter[first_name]"
(String.t)::"filter[last_name]"
(String.t)::"filter[company]"
(String.t)::"filter[email]"
(String.t)::"filter[email_work]"
(String.t)::"filter[phone_work]"
(String.t)::"filter[mobile_work]"
(String.t)::"filter[phone]"
(String.t)::"filter[mobile]"
(String.t)::"filter[blocked]"
(boolean())::"search[number]"
(String.t)::page
(integer()): Page of results to fetch.:per_page
(integer()): Number of results to return per page.
returns
Returns
{:ok, [%Contact{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec get_contacts_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, PlacetelAPI.Model.Contact.t()} | {:error, Tesla.Env.t()}
Retrieve a contact Fetches a contact by its ID
parameters
Parameters
connection
(PlacetelAPI.Connection): Connection to serverid
(integer()): ID of a contactopts
(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Contact.t}
on success{:error, Tesla.Env.t}
on failure
@spec post_contacts(Tesla.Env.client(), PlacetelAPI.Model.PostContacts.t(), keyword()) :: {:ok, PlacetelAPI.Model.Contact.t()} | {:error, Tesla.Env.t()}
Create a contact Creates a contact
parameters
Parameters
connection
(PlacetelAPI.Connection): Connection to servercontacts
(PostContacts):opts
(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Contact.t}
on success{:error, Tesla.Env.t}
on failure
@spec put_contacts_id( Tesla.Env.client(), integer(), PlacetelAPI.Model.PutContacts.t(), keyword() ) :: {:ok, PlacetelAPI.Model.Contact.t()} | {:error, Tesla.Env.t()}
Update a contact Updates a contact for a given ID
parameters
Parameters
connection
(PlacetelAPI.Connection): Connection to serverid
(integer()): Contact IDcontacts
(PutContacts):opts
(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Contact.t}
on success{:error, Tesla.Env.t}
on failure