@nova-studios-ltd/typescript-netapi
v2.0.2
Published
[](https://github.com/Nova-Studios-Ltd/Typescript-NetAPI-Package/actions/workflows/npm-publish.yml) # Typescript NetAPI
Downloads
17
Readme
Typescript NetAPI
Description
NPM package for our internal NetAPI class
Requirements
- Node.js
- npm (normally included)
- typescript
Installation
npm install @nova-studios-ltd/typescript-netapiBasic Usage
import { NetAPI } from "@nova-studios-ltd/typescript-netapi";
//Optional: Set a global domain
NetAPI.SetDefaultDomain("https://api.novastudios.uk");
// Optional
NetAPI.SetDefaultHeaders({
"Authorization": "Pineapples"
});
// GET (Applies to all methods) Without headers
await NetAPI.GET<string>("/Channel/my-new-channel");
// GET (Applies to all methods) With headers
await NetAPI.GET<string>("/Channel/my-new-channel-2", {"Authorization": "Bearer Pineapples"});
Getting the Source Code
Download a zipped version here or clone via HTTPS:
git clone https://github.com/Nova-Studios-Ltd/Typescript-NetAPI-Package.gitLicense
This project is currently licensed under a GPLv3 license.
