Skip to content

6. API calls

Vikram Ezhil edited this page Nov 23, 2018 · 14 revisions

The human API plugin extends humanapi wellness API calls and can easily be used in your app with a simple call.

The list of supported wellness data keys are as per below,

To access the wellness API data, simply pass any of the above keys along with the access token to get the relevant information.

An example for getting the wellness API data for activities

Cordova, Ionic 1

window.plugin.humanapi.execute("activities", "ACCESS_TOKEN", function(result) {
    alert("Result = " + result)
}, function(error) {
    alert("Error = " + error)
})

Ionic 2+

var human: any = window
human.plugin.humanapi.execute("activities", "ACCESS_TOKEN", (result) => {
  alert("Result = " + result)
}, (error) => {
  alert("Error = " + error)
})
Clone this wiki locally