speedruncom.js 2.0.6 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +18 -22
- package/README.md +2 -10
- package/bun.lock +20 -0
- package/lib/{endpoints → src/endpoints}/endpoints.post.d.ts +5 -0
- package/lib/{index.d.ts → src/index.d.ts} +1 -2
- package/lib/{index.js → src/index.js} +1 -2
- package/lib/{interfaces.d.ts → src/interfaces.d.ts} +436 -436
- package/lib/src/requests.d.ts +7 -0
- package/lib/src/requests.js +17 -0
- package/lib/{responses.d.ts → src/responses.d.ts} +1 -1
- package/package.json +13 -19
- package/src/endpoints/endpoints.post.ts +6 -0
- package/src/index.ts +1 -4
- package/src/interfaces.ts +436 -436
- package/src/requests.ts +26 -0
- package/src/responses.ts +1 -1
- package/tsconfig.json +3 -3
- package/LICENSE +0 -504
- package/lib/Client.d.ts +0 -11
- package/lib/Client.js +0 -23
- package/src/Client.ts +0 -30
- /package/lib/{endpoints → src/endpoints}/endpoints.get.d.ts +0 -0
- /package/lib/{endpoints → src/endpoints}/endpoints.get.js +0 -0
- /package/lib/{endpoints → src/endpoints}/endpoints.post.js +0 -0
- /package/lib/{enums.d.ts → src/enums.d.ts} +0 -0
- /package/lib/{enums.js → src/enums.js} +0 -0
- /package/lib/{interfaces.js → src/interfaces.js} +0 -0
- /package/lib/{responses.js → src/responses.js} +0 -0
- /package/lib/{types.d.ts → src/types.d.ts} +0 -0
- /package/lib/{types.js → src/types.js} +0 -0
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
name: Publish
|
|
2
|
-
|
|
3
1
|
on:
|
|
4
2
|
push:
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
workflow_dispatch:
|
|
3
|
+
tags:
|
|
4
|
+
- 'v*'
|
|
8
5
|
|
|
6
|
+
permissions:
|
|
7
|
+
id-token: write
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
9
10
|
jobs:
|
|
10
11
|
publish:
|
|
11
|
-
name: Publish Package
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
|
-
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
id-token: write
|
|
14
16
|
steps:
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- name: Use Node.js
|
|
19
|
-
uses: actions/setup-node@v4
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: oven-sh/setup-bun@v2
|
|
20
19
|
with:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
run: npm publish
|
|
29
|
-
env:
|
|
30
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
20
|
+
bun-version: latest
|
|
21
|
+
- run: bun i --frozen-lockfile
|
|
22
|
+
- run: bun run build
|
|
23
|
+
- uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: latest
|
|
26
|
+
- uses: JS-DevTools/npm-publish@v4
|
package/README.md
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# speedruncom.js
|
|
2
2
|
|
|
3
3
|
Speedrun.com has two API versions. Version 1 is officially documented, REST, public and directly exposed to users. Version 2 is a pre-production RPC API designed only for internal use of site functions, and is much more complicated and less user-friendly, especially regarding authentication and browser CORS.
|
|
4
4
|
|
|
5
|
-
Version 1 is mainly read-only, and when it isn't read only it may just be broken. If you want to use any of the modern features of the site now, you'll use version 2. This
|
|
6
|
-
|
|
7
|
-
This module isn't intended to give any helper functions to the user; it's more of an index of the params and responses of the site endpoints, to be used for type checking on a more user-friendly module.
|
|
8
|
-
|
|
9
|
-
# Usage
|
|
10
|
-
|
|
11
|
-
**`npm i speedruncom.js`**
|
|
12
|
-
|
|
13
|
-
`Client` is the default export, and enums and interfaces are the named exports for TypeScript users.
|
|
5
|
+
Version 1 is mainly read-only, and when it isn't read only it may just be broken. If you want to use any of the modern features of the site now, you'll use version 2. This package consists of types that make up this undocumented api, and a small utility for calling GET and POST.
|
package/bun.lock
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfileVersion": 1,
|
|
3
|
+
"configVersion": 0,
|
|
4
|
+
"workspaces": {
|
|
5
|
+
"": {
|
|
6
|
+
"name": "speedruncom.js",
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@types/node": "^25.9.3",
|
|
9
|
+
"typescript": "^6.0.3",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
"packages": {
|
|
14
|
+
"@types/node": ["@types/node@25.9.3", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg=="],
|
|
15
|
+
|
|
16
|
+
"typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="],
|
|
17
|
+
|
|
18
|
+
"undici-types": ["undici-types@7.24.6", "", {}, "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg=="],
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -391,6 +391,11 @@ export default interface POSTEndpoints {
|
|
|
391
391
|
verified?: Enums.RunStatus;
|
|
392
392
|
verifiedById?: string;
|
|
393
393
|
videoState?: Enums.VideoState;
|
|
394
|
+
/**
|
|
395
|
+
* The maximum amount of moderation runs per page.
|
|
396
|
+
*
|
|
397
|
+
* @max 100
|
|
398
|
+
*/
|
|
394
399
|
limit: number;
|
|
395
400
|
page: number;
|
|
396
401
|
};
|