0.1.7 • Published 3 years ago

towerverse.js v0.1.7

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

TowerVerse.js

npm npm GitHub Repo stars GitHub Sponsors Mocha Tests GitHub

A TypeScript/JavaScript library for TowerVerse. For full documentation, see https://towerverse.github.io/towerverse.js/

Install

npm install towerverse.js

Usage

See ./examples for more.

import { Client } from 'towerverse.js'
// or
const { Client } = require('towerverse.js')

// Create a client
const client = new Client()

// connect to the server
client.connect().then(async () => {
  console.log('Connected to server!')

  // Create an account
  client.createTraveller({
    travellerName: 'John Doe',
    travellerEmail: 'john.doe@example.com',
    // can someone teach john basic security practices?
    travellerPassword: 'password123'
  }).then(() => {
    // You have created an account, and will be sent an email with a code, use `client.traveller.verify('MY_CODE')` to claim your account.
    console.log(`Successfully created traveller '${client.traveller?.name}'`)
  }).catch(err => {
    console.log(err)
  })
})

Tests

Install dependencies and run the mocha tests.

npm ci
npm run test

Examples

Install dependencies, then use ts-node to try an example from the ./examples directory.

npm i
ts-node examples/login.ts

Support

Coming soon

0.2.0-beta.0

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago