1.0.60 • Published 7 months ago

curtain-web-api v1.0.60

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Curtain Web API


This is a node.js package used to interact with the Curtain Web REST API.

Installation

npm install curtain-web-api pouchdb -s
npm install @types/pouchdb -D

Usage

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);
});
1.0.60

7 months ago

1.0.59

7 months ago

1.0.58

7 months ago

1.0.49

8 months ago

1.0.51

8 months ago

1.0.50

8 months ago

1.0.55

8 months ago

1.0.54

8 months ago

1.0.53

8 months ago

1.0.52

8 months ago

1.0.57

7 months ago

1.0.56

7 months ago

1.0.48

1 year ago

1.0.47

1 year ago

1.0.46

1 year ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.39

2 years ago

1.0.17

2 years ago

1.0.38

2 years ago

1.0.40

2 years ago

1.0.44

2 years ago

1.0.22

2 years ago

1.0.43

2 years ago

1.0.21

2 years ago

1.0.42

2 years ago

1.0.20

2 years ago

1.0.41

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.45

2 years ago

1.0.23

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.16

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago