Skip to content

Commit 399a126

Browse files
author
DS Software
committed
version 1.1.2, updated JSDoc
1 parent 9cda717 commit 399a126

6 files changed

Lines changed: 25 additions & 25 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scf-api",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "An SCF API Client for NodeJS",
55
"main": "index.js",
66
"type": "module",

src/sections/gtw.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ export default class GTW {
3232
}
3333

3434
/**
35-
* @typedef {Object} PlayerEntry
35+
* @typedef {Object} GTWPlayer
3636
* @property {string} discord_id
3737
* @property {number} total
3838
39-
* @typedef {Object} Leaderboard
40-
* @property {PlayerEntry[]} weekly
41-
* @property {PlayerEntry[]} overall
39+
* @typedef {Object} GTWLeaderboard
40+
* @property {GTWPlayer[]} weekly
41+
* @property {GTWPlayer[]} overall
4242
43-
* @typedef {Object} GetTopResponse
44-
* @property {Leaderboard} score
45-
* @property {Leaderboard} rounds
43+
* @typedef {Object} GTWTop
44+
* @property {GTWLeaderboard} score
45+
* @property {GTWLeaderboard} rounds
4646
*
4747
* Returns Guess The Word leaderboards.
48-
* @returns {Promise<GetTopResponse>}
48+
* @returns {Promise<GTWTop>}
4949
*/
5050
async getTop() {
5151
let response = await this.#client.sendAPIRequest(this.#section, "getTop", "GET", []);

src/sections/inactive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ export default class Inactive {
7171
}
7272

7373
/**
74-
* @typedef {Object} PlayerEntry
74+
* @typedef {Object} InactivePlayer
7575
* @property {string} uuid
7676
* @property {number} requested
7777
* @property {number} expired
7878
*
7979
* Returns the list of all inactive players.
80-
* @returns {Promise<PlayerEntry[]>}
80+
* @returns {Promise<InactivePlayer[]>}
8181
*/
8282
async list() {
8383
let response = await this.#client.sendAPIRequest(this.#section, "list", "GET", []);

src/sections/minigames.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,24 @@ export default class Minigames {
111111
}
112112

113113
/**
114-
* @typedef {Object} Coins
114+
* @typedef {Object} MinigameCoins
115115
* @property {number} purse
116116
* @property {number} bank
117117
* @property {number} total
118118
*
119-
* @typedef {Object} Cooldowns
119+
* @typedef {Object} MinigameCooldowns
120120
* @property {string} work
121121
* @property {string} crime
122122
* @property {string} beg
123123
* @property {string} social
124124
*
125-
* @typedef {Object} PlayerEntry
125+
* @typedef {Object} MinigamePlayer
126126
* @property {string} discord_id
127-
* @property {Coins} coins
128-
* @property {Cooldowns} cooldowns
127+
* @property {MinigameCoins} coins
128+
* @property {MinigameCooldowns} cooldowns
129129
*
130130
* Returns top 10 minigame players, sorted by networth.
131-
* @returns {Promise<PlayerEntry[]>}
131+
* @returns {Promise<MinigamePlayer[]>}
132132
*/
133133
async getTop() {
134134
let response = await this.#client.sendAPIRequest(this.#section, "getTop", "GET", []);
@@ -140,7 +140,7 @@ export default class Minigames {
140140
*
141141
* Returns the minigame profile for a Discord ID.
142142
* @param {string} discord_id
143-
* @returns {Promise<PlayerEntry>}
143+
* @returns {Promise<MinigamePlayer>}
144144
*/
145145
async getProfile(discord_id) {
146146
let response = await this.#client.sendAPIRequest(this.#section, "getProfile", "GET", [

src/sections/score.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ export default class Score {
1313
}
1414

1515
/**
16-
* @typedef {Object} PlaceEntry
16+
* @typedef {Object} ScorePlaceEntry
1717
* @property {number} place
1818
* @property {number} score
1919
* @property {string} nick
2020
*
21-
* @typedef {Object} PlayerEntry
21+
* @typedef {Object} PlayerScore
2222
* @property {string} uuid
2323
* @property {number} score
2424
* @property {string} nick
@@ -28,7 +28,7 @@ export default class Score {
2828
* Returns the score and the place of a user in the guild of the token this week.
2929
* @param {string} uuid
3030
* @param {boolean} overall
31-
* @returns {Promise<PlaceEntry>}
31+
* @returns {Promise<ScorePlaceEntry>}
3232
*/
3333
async getCutoff(uuid, overall = false) {
3434
let response = await this.#client.sendAPIRequest(this.#section, "getCutoff", "GET", [
@@ -55,7 +55,7 @@ export default class Score {
5555
* Returns the score and the place of a user in the guild of the token in the past 7 days.
5656
* @param {string} uuid
5757
* @param {boolean} overall
58-
* @returns {Promise<PlaceEntry>}
58+
* @returns {Promise<ScorePlaceEntry>}
5959
*/
6060
async getRolling(uuid, overall = false) {
6161
let response = await this.#client.sendAPIRequest(this.#section, "getRolling", "GET", [
@@ -107,7 +107,7 @@ export default class Score {
107107
/**
108108
* Returns the top players in a guild based on their score.
109109
* @param {string|null} guild_id
110-
* @returns {Promise<{total: number, list: PlayerEntry[]}>}
110+
* @returns {Promise<{total: number, list: PlayerScore[]}>}
111111
*/
112112
async getTop(guild_id = null) {
113113
let args = [];

0 commit comments

Comments
 (0)