Method: Figo#get_task_state

Defined in:
lib/task/api_call.rb

#get_task_state(task, options) ⇒ TaskState

Poll the task progress.

Parameters:

  • task (Object)
    • Task object

  • options (Object)
    • further options (optional)

    @param options.pin [Boolean] - submit PIN @param options.continue [Boolean] - this flag signals to continue after an error condition or to skip a PIN or challenge-response entry @param options.save_pin [Boolean] - this flag indicates whether the user has chosen to save the PIN on the figo Connect server @param options.response [Boolean] - submit response to challenge

Returns:

  • (TaskState)

    The result parameter is a TaskState object which represents the current status of the task.



19
20
21
22
23
24
25
26
27
28
# File 'lib/task/api_call.rb', line 19

def get_task_state(task, options)
  options ||= {}
  options["id"] = task["task_token"]
  if (options.pin)
    options.save_pin ||= 0
  end
  options.continue ||= 0

  query_api_object TaskState, "/task/progress?id=" + task.task_token, options.to_query, "POST", nil
end