OpenXchangeClient.Api.MailCategories (open_xchange_client v0.10.1)
API calls for all endpoints tagged MailCategories
.
Link to this section Summary
Functions
Moves mails to the given category
Add a new rule Adds a new rule with the given mail addresses to the given category and optionally reorganize all existing mails in the inbox.
Retrieves the unread counts of active mail categories
Link to this section Functions
Link to this function
move_mails(connection, session, category_id, body, opts \\ [])
@spec move_mails( Tesla.Env.client(), String.t(), String.t(), [OpenXchangeClient.Model.MailCategoriesMoveBody.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.CommonResponse.t()} | {:error, Tesla.Env.t()}
Moves mails to the given category
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- category_id (String.t): The identifier of a category.
- body ([OpenXchangeClient.Model.MailCategoriesMoveBody.t]): 'A JSON array of mail identifier, e.g.: [{"id":ID, "folder_id":FID},{"id":ID2, "folder_id":FID2}, {...}]'
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
Link to this function
train(connection, session, category_id, body, opts \\ [])
@spec train( Tesla.Env.client(), String.t(), String.t(), OpenXchangeClient.Model.MailCategoriesTrainBody.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.CommonResponse.t()} | {:error, Tesla.Env.t()}
Add a new rule Adds a new rule with the given mail addresses to the given category and optionally reorganize all existing mails in the inbox.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- category_id (String.t): The identifier of a category.
- body (MailCategoriesTrainBody): 'A JSON object containing a "from" field which contains an array of mail addresses.'
- opts (KeywordList): [optional] Optional parameters
- :apply_for_existing (boolean()): A flag indicating whether old mails should be reorganized. Defaults to 'false'.
- :apply_for_future_ones (boolean()): A flag indicating whether a rule should be created or not. Defaults to 'true'.
returns
Returns
on success {:error, Tesla.Env.t} on failure
Link to this function
unread(connection, session, opts \\ [])
@spec unread(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.MailCategoriesUnreadResponse.t()} | {:error, Tesla.Env.t()}
Retrieves the unread counts of active mail categories
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- opts (KeywordList): [optional] Optional parameters
- :category_ids (String.t): A comma separated list of category identifiers. If set only the unread counters of this categories are retrieved.
returns
Returns
on success {:error, Tesla.Env.t} on failure