has.getAAID(Object object)
Obtains the AAID.
Since: 1.0.8
Parameters
The input parameter is an object containing the following fields.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| success | function | No | Callback triggered when the API call is successful. |
| fail | function | No | Callback triggered when the API call fails. |
| complete | function | No | Callback triggered when the API call is complete, regardless of success or failure. |
Return value of success
An object containing the following fields.
| Parameter | Type | Description |
|---|---|---|
| AAID | string | Anonymous ID of an application. |
Error code information
| Error Code | Error Message |
|---|---|
| 11001001 | getAAID error. |
Example:
has.getAAID({
success: (res) => {
console.info('getAAID success', res);
},
fail: (err) => {
console.error('getAAID fail', err);
},
complete: (res) => {
console.info('getAAID complete', res);
}
}); has.deleteAAID(Object object)
Deletes an AAID.
Since: 1.0.8
Parameters
The input parameter is an object containing the following fields.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| success | function | No | Callback triggered when the API call is successful. |
| fail | function | No | Callback triggered when the API call fails. |
| complete | function | No | Callback triggered when the API call is complete, regardless of success or failure. |
Error code information
| Error Code | Error Message |
|---|---|
| 11001101 | deleteAAID error. |
Example:
has.deleteAAID({
success: () => {
console.info('deleteAAID success');
},
fail: (err) => {
console.error('deleteAAID fail', err);
},
complete: (res) => {
console.info('deleteAAID complete', res);
}
}); has.getPushToken(Object object)
Obtain the token of the push service.
Since: 1.0.8
Parameters
The input parameter is an object containing the following fields.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| success | function | No | Callback triggered when the API call is successful. |
| fail | function | No | Callback triggered when the API call fails. |
| complete | function | No | Callback triggered when the API call is complete, regardless of success or failure. |
Return value of success
An object containing the following fields.
| Parameter | Type | Description |
|---|---|---|
| pushToken | string | Push token. |
Error code information
| Error Code | Error Message |
|---|---|
| 11001201 | getPushToken error. |
Example:
has.getPushToken({
success: (res) => {
console.info('getPushToken success', res);
},
fail: (err) => {
console.error('getPushToken fail', err);
},
complete: (res) => {
console.info('getPushToken complete', res);
}
}); has.deletePushToken(Object object)
Deletes a push token.
Since: 1.0.8
Parameters
The input parameter is an object containing the following fields.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| success | function | No | Callback triggered when the API call is successful. |
| fail | function | No | Callback triggered when the API call fails. |
| complete | function | No | Callback triggered when the API call is complete, regardless of success or failure. |
Error code information
| Error Code | Error Message |
|---|---|
| 11001301 | deleteToken error. |
Example:
has.deletePushToken({
success: () => {
console.info('deletePushToken success');
},
fail: (err) => {
console.error('deletePushToken fail', err);
},
complete: (res) => {
console.info('deletePushToken complete', res);
}
});