Skip to content

Commit

Permalink
fix: document API
Browse files Browse the repository at this point in the history
  • Loading branch information
jrea committed Jun 1, 2022
1 parent 2663ffd commit 6860995
Show file tree
Hide file tree
Showing 4 changed files with 1,050 additions and 833 deletions.
15 changes: 13 additions & 2 deletions lib/nile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,26 @@

## Usage

A full list of functions available to the Nile object can be found in the [source readme](./src/README.md)
A full list of functions available to the Nile object can be found in the [docs](https://docs.thenile.dev/).

## Basic example

```typescript
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
await nile.user
.createUser({ email: "anon@anon.com", password: "secret" })
.catch((error) => console.error(error));

Expand Down

0 comments on commit 6860995

Please sign in to comment.