2.0.1 • Published 2 years ago
@johanvanhelden/spacetraders-v2-ts v2.0.1
spacetraders-v2-ts
A SpaceTraders V2 TypeScript SDK for the online programming game SpaceTraders.
For more information, please visit https://spacetraders.io/
Using this SDK
Installation
$ npm install @johanvanhelden/spacetraders-v2-ts --saveUsing the SDK
import { DefaultApi } from "@johanvanhelden/spacetraders-v2-ts";
const api = new DefaultApi();
api.getStatus()
.then((response) => {
const { data } = response;
console.log(data);
})
.catch((error) => {
console.error(error);
})
.finally(() => {
console.info("All done!");
});Building the SDK
These instructions are in order to build the SDK (for example to update the package). If you are intending to simply use the SKD in your own project, you can skip this section.
Requirements
- Linux (either as an OS, VM or WSL2)
- Docker (or Docker Desktop for Windows)
- NVM
Generating the SDK
In order to generate the SDK, simply run:
$ make sdkTo build the SDK:
$ make buildMake sure to revert any changes to the README.md and package.json.
And enter the new version number for the package.json.
Publishing the package
Publishing is handled automatically through GitHub Actions upon creating a release.