# curtain-web-api

> ---

Latest version **1.0.95** (published 2026-07-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install curtain-web-api
pnpm add curtain-web-api
yarn add curtain-web-api
bun add curtain-web-api
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.95 |
| Published | 2026-07-15 |
| First published | 2023-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 174.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Toan K. Phung |
| Maintainers | noatgnu |

## Links

- npm: https://www.npmjs.com/package/curtain-web-api
- npm.io page: https://npm.io/package/curtain-web-api

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^1.3.5
- [jssha](https://npm.io/package/jssha.md) ^3.3.1
- [pouchdb](https://npm.io/package/pouchdb.md) ^9.0.0

## Recent versions

- 1.0.95 (latest) — 2026-07-15
- 1.0.94 — 2026-07-15
- 1.0.93 — 2026-07-15
- 1.0.92 — 2026-05-15
- 1.0.91 — 2026-05-14
- 1.0.90 — 2026-05-14
- 1.0.89 — 2026-03-02
- 1.0.88 — 2026-01-23
- 1.0.87 — 2026-01-23
- 1.0.85 — 2026-01-23
- 1.0.84 — 2026-01-22
- 1.0.83 — 2026-01-22
- 1.0.82 — 2026-01-22
- 1.0.81 — 2026-01-22
- 1.0.80 — 2026-01-17
- … 80 more at https://npm.io/package/curtain-web-api/versions

## README

# Curtain Web API
---

This is a node.js package used to interact with the Curtain Web REST API.

## Installation

```bash
npm install curtain-web-api pouchdb -s
npm install @types/pouchdb -D
```

## Usage

```typescript
import { CurtainWebApi } from 'curtain-web-api';

const curtainAPI = new CurtainWebApi("https://curtain-api-location/")


// Login to the API 

curtainAPI.login("username", "password").then((result) => {
    console.log(result);
    // The result is an object containing the user's information
}).catch((error) => {
    console.log(error);
});

// Get the user's information
curtainAPI.getUser().then((result) => {
    console.log(result);
    // The result is an object containing the user's information similar to the login but can only be performed after login have succeeded
}).catch((error) => {
    console.log(error);
});

// Get session information
curtainAPI.getSessionSettings(sessionId).then((result) => {
    console.log(result);
    // The result is an object containing the session's basic information without any data
}).catch((error) => {
    console.log(error);
});


// Get session data
curtainAPI.postSettings(sessionId, sessionToken).then((result) => {
    console.log(result);
    // The result is an object containing the session's data
}).catch((error) => {
    console.log(error);
});


// Upload session data
curtainAPI.putSettings(settings, enableToPublic, description, sessionType).then((result) => {
    console.log(result);
    // The result is an object containing the session's data
}).catch((error) => {
    console.log(error);
});
```

---
_Source: https://npm.io/package/curtain-web-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
