OpenXchangeClient.Api.Multiple (open_xchange_client v0.10.1)

API calls for all endpoints tagged Multiple.

Link to this section Summary

Functions

Processes multiple requests to other modules in a single request.

Link to this section Functions

Link to this function

process(connection, session, body, opts \\ [])

Processes multiple requests to other modules in a single request.

Not supported requests are: the ones from modules login and multiple POST requests with a multipart encoding (uploads) * GET requests which do not use an object as described in Low level protocol #### Request body A JSON array with JSON objects describing the requests. Each object contains a field module with the name of the request's module and the field action with the concrete request action to execute. Additionally the parameters of the request are added as fields too. A session parameter is not included! If the request has a request body itself, this body is stored as a JSON object in a field data. #### Example: query reminder range and update a reminder's alarm json [{"module":"reminder","action":"range","end":1497461067180},{"module":"reminder","action":"remindAgain","id":51,"data":{"alarm":1459478800000}}]

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • body ([OpenXchangeClient.Model.SingleRequest.t]): A JSON array with JSON objects, each describing one request.
  • opts (KeywordList): [optional] Optional parameters
    • :continue (boolean()): Specifies whether processing of requests should stop when an error occurs, or whether all request should be processed regardless of errors.

returns

Returns

on success {:error, Tesla.Env.t} on failure