# titanium-ticket-api-node

> Easy Nodejs integration for the Titanium Robotics Ticket API

Latest version **0.0.3** (published 2020-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install titanium-ticket-api-node
pnpm add titanium-ticket-api-node
yarn add titanium-ticket-api-node
bun add titanium-ticket-api-node
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-07-27 |
| First published | 2020-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Titanium Robotics |
| Maintainers | timb699 |
| Keywords | Supreme, ticket, api |

## Links

- npm: https://www.npmjs.com/package/titanium-ticket-api-node
- Repository: https://github.com/Titanium-ctrl/titanium-ticket-api-node
- Homepage: https://github.com/Titanium-ctrl/titanium-ticket-api-node#readme
- Issues: https://github.com/Titanium-ctrl/titanium-ticket-api-node/issues
- npm.io page: https://npm.io/package/titanium-ticket-api-node

## Dependencies (6)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.3
- [form-data](https://npm.io/package/form-data.md) ^3.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^5.0.0
- [node-downloader-helper](https://npm.io/package/node-downloader-helper.md) ^1.0.13

## Recent versions

- 0.0.3 (latest) — 2020-07-27
- 0.0.2 — 2020-07-27
- 0.0.1 — 2020-07-27

## README

# titanium-ticket-api-node

This npm package allows easy integration of the Titanium Robotics Ticket API into your Nodejs program. You will be provided an API URL and API Key upon purchase. 


# Installation
```npm install titanium-ticket-api-node```

# Usage

## Before ATC

To generate a cookie that'll be used before atc, all you need to do is
```javascript
const ticketgen = require("titanium-ticket-api-node")

ticketgen.genticket(apiurl, apikey, proxy, undefined, useragent).then(response => {/* Your code afterwards here */}).catch(err => console.log(err))
```
The response string will look like this
```_tlcket=2bf789849f1413a8f0556d52c4038567f9bacc62291d02e96c05bf24c732315a9230a4f748c394c14046165fd320701074155ebe653638ea4963fd2ccadb85551595846480;path=/```

## After ATC

The command, is similar to the above, however the undefined variable will be the server side generated ticket.
```javascript
const ticketgen = require("titanium-ticket-api-node")

ticketgen.genticket(apiurl, apikey, proxy, ticket, useragent).then(response => {/* Your code afterwards here */}).catch(err => console.log(err))
```

# Errors
Any errors returned from the API will be handled as a rejected promise by the module, for example if your API key is invalid or expired/out of uses.

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