SCILLClient

This is the main entrance point in to the SCILL JavaScript SDK. Use this class to get instances of SCILL product APIs.

Initialization

Depending on the environment and programming language it’s a bit different

npm

In npm environments (NodeJS, Angular, React, Vue, etc) you can get an instance of that class in JavaScript:

const SCILL = require("@scillgame/scill-admin-js");
const eventsApi = SCILL.getEventsApi(accessToken);

and in TypeScript:

import * as SCILL from '@scillgame/scill-admin-js';
const eventsApi = SCILL.getEventsApi(accessToken);

APIs

Use the methods below to get an instance of an API class for a SCILL product. Please don’t create instances of those APIs yourself as they are subject to change - while the SCILLClient API will not.

getAppsApi

static WebhooksApi getAppsApi(accessToken, environment?);
Parameters

accessToken string

The 4Players JWT token. See Authentication for more details.

environment string

This is an optional value to choose the environment (i.e. production or development). If you are not specifically asked by the SCILL team to set this value (for testing purposes for example), then just leave this out.

Returns

An instance of the AppsApi class. Setup for production use.

getApiKeyApi

static ApiKeyApi getApiKeyApi(accessToken, environment?);
Parameters

accessToken string

The 4Players JWT token. See Authentication for more details.

environment string

This is an optional value to choose the environment (i.e. production or development). If you are not specifically asked by the SCILL team to set this value (for testing purposes for example), then just leave this out.

Returns

An instance of the ApiKeyApi class. Setup for production use.

getEventsApi

Initiate an instance of the EventsApi. It allows you to query your current event limit and counter and will provide a method to query all available event types.

static EventsApi getEventsApi(accessToken, environment?);
Parameters

accessToken string

The 4Players JWT token. See Authentication for more details.

environment string

This is an optional value to choose the environment (i.e. production or development). If you are not specifically asked by the SCILL team to set this value (for testing purposes for example), then just leave this out.

Returns

An instance of the EventsApi class. Setup for production use.

getChallengesApi

static ChallengesApi getChallengesApi(accessToken, environment?);
Parameters

accessToken string

The 4Players JWT token. See Authentication for more details.

environment string

This is an optional value to choose the environment (i.e. production or development). If you are not specifically asked by the SCILL team to set this value (for testing purposes for example), then just leave this out.

Returns

An instance of the ChallengesApi class. Setup for production use.

getBattlePassesApi

static BattlePassesApi getBattlePassesApi(accessToken, environment?);
Parameters

accessToken string

The 4Players JWT token. See Authentication for more details.

environment string

This is an optional value to choose the environment (i.e. production or development). If you are not specifically asked by the SCILL team to set this value (for testing purposes for example), then just leave this out.

Returns

An instance of the BattlePassesApi class. Setup for production use.

getWebhooksApi

static WebhooksApi getWebhooksApi(accessToken, environment?);
Parameters

accessToken string

The 4Players JWT token. See Authentication for more details.

environment string

This is an optional value to choose the environment (i.e. production or development). If you are not specifically asked by the SCILL team to set this value (for testing purposes for example), then just leave this out.

Returns

An instance of the WebhooksApi class. Setup for production use.