CallAPI
A generic method for calling client API services. Useful in some circumstances.
Method Parameters
Parameter | Description |
---|---|
service | The name of the service |
operation | The name of the operation to call on the service |
serviceData | The parameters to send to the operation |
Note - the API Explorer is a great reference to determine the JSON format of the parameters.
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Construct the parameters
var serviceData = {};
serviceData.leaderboardId = "weekly";
serviceData.score = 100000;
serviceData.data = {};
serviceData.data.nickname = "batdude";
// Make the API Call
var res = bridge.callAPI("leaderboard", "POST_SCORE", serviceData);
// Construct the parameters
var serviceData = {};
serviceData.leaderboardId = "weekly";
serviceData.score = 100000;
serviceData.data = {};
serviceData.data.nickname = "batdude";
// Make the API Call
var res = bridge.callAPI("leaderboard", "POST_SCORE", serviceData);