@gameye/sdk
Version:
Node.js SDK for Gameye
43 lines • 1.22 kB
JavaScript
/**
* Start a match
* @param matchKey a unique identifier for this match, you will use this
* identifier to refer to this match in the future
* @param gameKey identifier of the game
* @param locationKeys list of location identifiers, if the first one is not
* available, the second one is tried and so on.
* @param templateKey identifier of the template for this game to use
* @param config configuration of the template
* @param endCallbackUrl url that gets called (via GET) after the match ended
*/
export function commandStartMatch(matchKey, gameKey, locationKeys, templateKey, config, endCallbackUrl) {
return this.command("start-match", {
matchKey,
gameKey,
locationKeys,
templateKey,
config,
endCallbackUrl,
});
}
/**
* Stop a match
* @param matchKey Identifer of the match
*/
export function commandStopMatch(matchKey) {
return this.command("stop-match", {
matchKey,
});
}
/**
* Fetch the match state
*/
export function queryMatch() {
return this.query("match", {});
}
/**
* Subscribe to the match state
*/
export function subscribeMatch() {
return this.subscribe("match", {});
}
//# sourceMappingURL=gameye-match.js.map