# ancapism-client

> Client for Ancapism

Latest version **1.1.0** (published 2019-02-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install ancapism-client
pnpm add ancapism-client
yarn add ancapism-client
bun add ancapism-client
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-02-18 |
| First published | 2019-02-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.12.0 |
| Dependencies | 2 |
| Unpacked size | 53.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | TbK3545 |
| Maintainers | tbk3545 |

## Links

- npm: https://www.npmjs.com/package/ancapism-client
- Repository: https://git.tbk321.com/zjjppiscool/ancapism-client
- Homepage: http://docs.tbk321.com/
- Issues: https://git.tbk321.com/zjjppiscool/ancapism-client/issues
- npm.io page: https://npm.io/package/ancapism-client

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.88.0
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^2.1.1

## Recent versions

- 1.1.0 (latest) — 2019-02-18
- 1.0.10 — 2019-02-18
- 1.0.9 — 2019-02-18
- 1.0.8 — 2019-02-18
- 1.0.7 — 2019-02-17
- 1.0.6 — 2019-02-16
- 1.0.5 — 2019-02-16
- 1.0.4 — 2019-02-16
- 1.0.3 — 2019-02-15
- 1.0.2 — 2019-02-15
- 1.0.1 — 2019-02-15
- 1.0.0 — 2019-02-15

## README

# Ancapism Node.JS Client
A client for Ancapism

Docs are at http://docs.tbk321.com/

# First Program

NPM is the reccommended way to obtain Ancapism Client. `npm i -s ancapism-client`
To use it, simply import the pacakge, and create a new `Client.`
TS: `import { Client, emotes, directions } from "ancapism-client"`
JS: `const { Client, emotes, directions } = require("ancapism-client")`

Check the docs for more information on the emotes and directions variables. They are utilities to help you with movement and emoting. Optionally, you can also supply another argument `updateInterval` which is the speed at which we will request chunks & data from the server in milliseconds. 10000 is the default and reccommended value.

The new `client` variable has a few diffrent events, but you should mostly be concerned with the "ready" event. `client.on("ready")` will be fired when the client is logged it. It is highly reccommended that you put all of the code interacting with the client here unless it is tied to another event like "message" or "debug". Check the docs for all of the events.

Sample program:
```
"TypeScript";
import { Client, emotes, directions } from "ancapism-client";
"JavaScript";
const { Client, emotes, directions } = require("ancapism-client");

const client = new Client("http://derpy.live:1338", "botuser101", "supersecurePasswd");

client.on("ready", () => {
    client.send("Hello world!");
    setInterval(() => {
        client.move(directions.northX, directions.northZ);
    }, 1000);
});

client.on("debug", console.log);
```

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