Nonstop Javascript SDK
Getting Task Details
There are some scenarios where the containing Client needs to know what is on offer to the user for completing a given task.
The main example of this is in order to present the correct information to logged out users in marketing scenarios such as on-boarding.
The Client application can call Nonstop with a given task type:
Nonstop.default.getTaskDetails('sign-up')
.then((taskDetails) => {
// Details of the task
})
.catch(() => {
// Something went wrong
});
The taskDetails response has the following properties:
pointsAvailable: Int- The number of points the user would receive for completing that TaskpointsAvailableDisplay: String- The number of points the user would receive for completing that Task, correctly formatted for display to the user.