@aneuhold/core-ts-api-lib
v2.0.9
Published
A library for interacting with the backend and defining the backend API for personal projects.
Downloads
2,047
Maintainers
Readme
Personal Core API Library
A library for interacting with the backend and defining the backend API for personal projects.
📦 Installation
To add to a repo, follow the instructions below for your environment:
For Node using NPM
Run yarn add @aneuhold/core-ts-api-lib
For Node using JSR
The below instructions still allow for things like Renovate to work, and normal commands with yarn such as yarn up
.
- Add the required JSR configuration to a
.yarnrc.yml
file if not there already:npmScopes: jsr: npmRegistryServer: 'https://npm.jsr.io'
- Add the package with
yarn add @jsr/aneuhold__core-ts-api-lib
For Deno
Run deno add jsr:@aneuhold/core-ts-api-lib
🟢 Usage
Pull in one of the services and use it like so:
import { APIService } from '@aneuhold/core-ts-api-lib';
// If using Node with JSR
// import { APIService } from '@jsr/aneuhold__core-ts-api-lib';
export default async function validateUser() {
const userInfo = await APIService.validateUser({
username: 'user',
password: 'pass'
});
console.log(userInfo);
}