OpenXchangeClient.Api.Pns (open_xchange_client v0.10.0)
API calls for all endpoints tagged Pns
.
Link to this section Summary
Functions
Adds a new subscription associated with a token for certain topics
Removes a subscription associated with a token for certain topics
Link to this section Functions
Link to this function
subscribe(connection, session, token, transport, topics, opts \\ [])
@spec subscribe( Tesla.Env.client(), String.t(), String.t(), String.t(), [String.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.PnsResponse.t()} | {:error, Tesla.Env.t()}
Adds a new subscription associated with a token for certain topics
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- token (String.t): The token to use when sending out notifications using specified transport
- transport (String.t): The identifer of the transport; currently supported: - \"apn\" - \"gcm\" - \"wns\" and - \"websocket\"
- topics ([String.t]): An array of topic identifiers or wild-cards, to which the subscription signals interest. E.g. [\"ox:mail:*\",\"ox:calendar:new\"] interest for all mail-related events and for newly created appointments
- opts (KeywordList): [optional] Optional parameters
- :client (String.t): The client identifier; e.g. \"open-xchange-appsuite\". If not specified, session-associated client identifier is considered
returns
Returns
on success {:error, Tesla.Env.t} on failure
Link to this function
unsubscribe(connection, session, token, transport, opts \\ [])
@spec unsubscribe(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.PnsResponse.t()} | {:error, Tesla.Env.t()}
Removes a subscription associated with a token for certain topics
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- token (String.t): The token to use when sending out notifications using specified transport
- transport (String.t): The identifer of the transport; currently supported: - \"apn\" - \"gcm\" - \"wns\" and - \"websocket\"
- opts (KeywordList): [optional] Optional parameters
- :client (String.t): The client identifier; e.g. \"open-xchange-appsuite\". If not specified, session-associated client identifier is considered
returns
Returns
on success {:error, Tesla.Env.t} on failure