# liverail-api

> A nodejs client library for the Liverail platform's API

Latest version **0.0.7** (published 2012-11-19) · 0 weekly downloads

## Install

```sh
npm install liverail-api
pnpm add liverail-api
yarn add liverail-api
bun add liverail-api
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2012-11-19 |
| First published | 2012-02-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | David Banham |
| Maintainers | pinion, davidbanham, sgentle |

## Links

- npm: https://www.npmjs.com/package/liverail-api
- Repository: https://github.com/PinionTech/liverail-api
- npm.io page: https://npm.io/package/liverail-api

## Dependencies (2)

- [xml2js](https://npm.io/package/xml2js.md) 0.1.x
- [request](https://npm.io/package/request.md) 2.9.x

## Recent versions

- 0.0.7 (latest) — 2012-11-19
- 0.0.6 — 2012-07-31
- 0.0.5 — 2012-07-31
- 0.0.4 — 2012-07-31
- 0.0.3 — 2012-03-13
- 0.0.2 — 2012-03-13
- 0.0.1 — 2012-02-22
- 0.0.0 — 2012-02-22

## README

# liverail-api 

## Purpose

This provides a node client library to use the Liverail API. 

[Liverail]: http://liverail.com/ 

Created by Pinion.

[Pinion]: http://pinion.gg/

## Installation

npm install liverail-api

## Demo

```javascript
var liverail = require('liverail-api');

liverail.login('username', 'password', function() {
	liverail.call('/entity/list', function(err, result) {
		if (err) { 
			console.error("Oh no!")
		} else {
			console.log(result.entities)
		}
	});
});
```

```javascript
var liverail = require('liverail-api');

liverail.login('username', 'password', function() {
	var params = {
		order_line_id: '123',
		time_end: '2012-02-22 00:00:00'
	}
	liverail.call('/order/line/edit', params, function(err, result) {
		if (err) { 
			console.error("Oh no!")
		}
	});
});
```

## API

### liverail.login(username, password, [callback])
login takes 3 arguments; username, password and a callback, to which it will pass an error indicator and the results from Liverail in case you're interested in them.

### liverail.call(route, [params], [callback])
call is a generic call function that will call a specified route on the liverail API. The token is added automatically, but you may pass an object with additional parameters to send to the api. You may also pass a callback, which will be called with an error indicator and the results of the API call.

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