View Source PlacetelAPI.Api.Calls (placetel_api v2.0.1)
API calls for all endpoints tagged Calls.
Link to this section Summary
Functions
Delete a call Delete a call by its ID
Fetch all incoming calls
Provides a list of all calls on a specific day (date) or today.
Retrieve a call Fetches a call by its ID
Initate a call Initates a call
Link to this section Functions
@spec delete_calls_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a call Delete a call by its ID
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serverid(integer()): Call IDopts(keyword): Optional parameters
returns
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec get_calls( Tesla.Env.client(), keyword() ) :: {:ok, [PlacetelAPI.Model.Call.t()]} | {:error, Tesla.Env.t()}
Fetch all incoming calls
Provides a list of all calls on a specific day (date) or today.
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serveropts(keyword): Optional parameters:"filter[date]"(Date.t): YYYY-MM-DD, defaults to today.:"filter[from_number]"(String.t)::"filter[to_number]"(String.t)::"filter[type]"(String.t)::order(String.t)::page(integer()): Page of results to fetch.:per_page(integer()): Number of results to return per page.
returns
Returns
{:ok, [%Call{}, ...]}on success{:error, Tesla.Env.t}on failure
@spec get_calls_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, PlacetelAPI.Model.Call.t()} | {:error, Tesla.Env.t()}
Retrieve a call Fetches a call by its ID
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serverid(integer()): Call IDopts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Call.t}on success{:error, Tesla.Env.t}on failure
@spec post_calls(Tesla.Env.client(), PlacetelAPI.Model.PostCalls.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Initate a call Initates a call
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to servercalls(PostCalls):opts(keyword): Optional parameters
returns
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure