@theniledev/js
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.194 • Public • Published

@theniledev/js

Usage

A full list of functions available to the Nile object can be found in the docs.

Basic example

import Nile from "@theniledev/js";

const nile = Nile({ apiUrl: props.apiUrl });

await nile.developer.loginDeveloper({
  loginInfo: {
    email: "dev@dev.dev",
    password: "123",
  },
});

// set the auth token for all sub classes
nile.authToken = nile.developer.authToken;

// create a user
await nile.user
  .createUser({
    loginInfo: {
      email: "anon@anon.com",
      password: "secret",
    },
  })
  .catch((error) => console.error(error));

const user = await nile.getUser({ id: 1 });
// log created user to console
console.log(user);

Contributing

Prereq

brew install yarn
yarn set version berry

Commands

To run:

yarn build
yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

To do a one-off build, use npm run build or yarn build.

To run tests, use npm test or yarn test.

Configuration

Code quality is set up for you with prettier, husky, and lint-staged. Adjust the respective fields in package.json accordingly.

Tests

Tests are set up to run with yarn test.

Readme

Keywords

none

Package Sidebar

Install

npm i @theniledev/js

Weekly Downloads

105

Version

1.0.0-alpha.194

License

MIT

Unpacked Size

4.07 MB

Total Files

117

Last publish

Collaborators

  • theniledev