2023-02-08 18:14:57 +02:00
# Tuitio client
2023-02-07 00:32:31 +02:00
## Introduction
2023-02-11 05:06:14 +02:00
Tuitio client is an npm package written in typescript that facilitates the integration of a javascript application with [Tuitio ](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio ).
2023-02-07 00:32:31 +02:00
## Package installation
The package installation can be done in two ways:
2023-02-08 18:14:57 +02:00
- from the command line: `npm install @flare/tuitio-client@1.0.0`
- from the package.json file: `"@flare/tuitio-client": "1.0.0"`
2023-02-07 00:32:31 +02:00
## How to use the package
2023-02-11 15:58:48 +02:00
```javascript!
const { TuitioClient, fetch, invalidate } = require("@flare/tuitio-client");
const TuitioClient = require("@flare/tuitio-client");
const type { TuitioToken, TuitioAuthenticationResult, TuitioState } = require("@flare/tuitio-client");
```
```javascript!
import { TuitioClient, fetch, invalidate } from "@flare/tuitio-client";
import TuitioClient from "@flare/tuitio-client";
import type { TuitioToken, TuitioAuthenticationResult, TuitioState } from "@flare/tuitio-client";
```
2023-02-07 00:32:31 +02:00
## Unit testing
Unit testing is done using [Jest ](https://jestjs.io/ ). This is an awesome testing framework created by Facebook.
The files containing tests are identified by the extension `*.test.ts` .
All tests in the package can be executed by running: `npm test` .
## Changelog
2023-02-11 15:58:48 +02:00
1.0.0 - Package initialization
2023-02-11 15:38:58 +02:00
1.0.1 - Export Tuitio types