-
Notifications
You must be signed in to change notification settings - Fork 4
Functions
LaJBel Ms edited this page Nov 6, 2021
·
8 revisions
Connect your game with Newgrounds.js
connect(appID: string, cipher: string, config: object)
Example
import { connect } from "newgrounds.js";
connect("521024:EFSANEL", "flsa9qlence/==", {
debug: true, // use debugs mode - default false
});
Unlock a medal. <Source>
unlockMedal(id: number);
Example
import { unlockMedal } from "newgrounds.js";
unlockMedal(251921);
Post a score in a scoreboard. <Source>
postScore(id: number, score: number);
Example
import { postScore } from "newgrounds.js";
postScore(52102, 1) // scoreboard id and score for post
Get scores data from a Scoreboard. <Source>
getScores(id: number, user: number | string, period: string, social: boolean, skip: number, limit: number);
Example
import { getScores } from "newgrounds.js";
getScores(281942, 0, "A", false, 0, 20);