node-papermc
Advanced tools
Comparing version 0.1.0 to 1.0.0
{ | ||
"name": "node-papermc", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "PaperMC API", | ||
"main": "src/index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"test": "node ./tests/test.js" | ||
"test:js": "node tests/test.js", | ||
"test:ts": "ts-node tests/test.ts", | ||
"build": "tsc", | ||
"prepublish": "tsc" | ||
}, | ||
@@ -19,3 +20,11 @@ "keywords": [ | ||
"node-fetch": "^2.6.1" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@types/node-fetch": "^2.5.8", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.1.3" | ||
}, | ||
"files": [ | ||
"dist/**/*" | ||
] | ||
} |
# node-papermc | ||
## functions | ||
### BASE_URL: string | ||
Base URL of rest api | ||
### projects | ||
Get Projects | ||
### getProject(project: string) | ||
### getProjectInfo(project: string): Promise\<PaperProjectInfos> | ||
Get project id, project name, version groups, versions | ||
### getVersion(project: string, version: string) | ||
### getVersionInfo(project: string, version: string) Promise\<PaperVersionInfos> | ||
Get project id, project name, version, builds | ||
### getVersions(project: string, version: string) | ||
### getVersionGroupInfo(project: string, version_group: string): Promise\<PaperVersionGroupInfos> | ||
Get project id, project name, version group, versions | ||
### getBuilds(project: string, version: string) | ||
### getVersionGroupBuilds(project: string, version_group: string): Promise\<PaperVersionGroupBuilds> | ||
Get project id, project name, version group, versions, builds | ||
### getBuild(project: string, version: string, build: number) | ||
### getBuildInfo(project: string, version: string, build: number): Promise\<PaperBuildInfos> | ||
Get project id, project name, build, time, changes, downloads | ||
## example | ||
```javascript | ||
const papermc = require('node-papermc'); | ||
const papermc = new node() | ||
Promise.all([ | ||
api.project, | ||
api.getProject('paper'), | ||
api.getVersion('paper', '1.16.4'), | ||
api.getVersions('paper', '1.16'), | ||
api.getBuilds('paper', '1.16'), | ||
api.getBuild('paper', '1.16.4', 256), | ||
]).then(console.log) | ||
``` | ||
### download(project: string, version: string, build: number, name: string): Promise\<Blob> | ||
Get build file blob | ||
## examples | ||
[<image src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Unofficial_JavaScript_logo_2.svg/1024px-Unofficial_JavaScript_logo_2.svg.png" width="20"> javascript example](tests/test.js) | ||
[<image src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Typescript_logo_2020.svg/1200px-Typescript_logo_2020.svg.png" width="20"> typescript example](tests/test.js) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
1
2943
3
3
0
29