retrieveActiveActions method

Future<ClientResponse<ActionResponse, Errors>> retrieveActiveActions(
  1. String userId
)

Retrieves all the actions for the user with the given Id that are currently active. An active action means one that is time based and has not been canceled, and has not ended.

@param {String} userId The Id of the user to fetch the actions for. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<ActionResponse, Errors>> retrieveActiveActions(
    String userId) {
  return _start<ActionResponse, Errors>()
      .withUri('/api/user/action')
      .withParameter('userId', userId)
      .withParameter('active', true)
      .withMethod('GET')
      .withResponseHandler(
          defaultResponseHandlerBuilder((d) => ActionResponse.fromJson(d)))
      .go();
}