@aneuhold/core-ts-api-lib
TypeScript icon, indicating that this package has built-in type declarations

2.0.9 • Public • Published

Personal Core API Library

JSR NPM

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.

  1. Add the required JSR configuration to a .yarnrc.yml file if not there already:
    npmScopes:
      jsr:
        npmRegistryServer: 'https://npm.jsr.io'
  2. 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);
}

See full documentation on usage at JSR!

Package Sidebar

Install

npm i @aneuhold/core-ts-api-lib

Weekly Downloads

144

Version

2.0.9

License

MIT

Unpacked Size

65.7 kB

Total Files

50

Last publish

Collaborators

  • aneuhold