# tokyo_amesh_node_client

> ## How to use

Latest version **0.3.3** (published 2018-02-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install tokyo_amesh_node_client
pnpm add tokyo_amesh_node_client
yarn add tokyo_amesh_node_client
bun add tokyo_amesh_node_client
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2018-02-20 |
| First published | 2017-08-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 16.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | satoyan |
| Keywords | 東京アメッシュ, tokyo, ame |

## Links

- npm: https://www.npmjs.com/package/tokyo_amesh_node_client
- Repository: https://github.com/satoyan/tokyo-amesh-nodejs-client
- Homepage: https://github.com/satoyan/tokyo-amesh-nodejs-client#readme
- Issues: https://github.com/satoyan/tokyo-amesh-nodejs-client/issues
- npm.io page: https://npm.io/package/tokyo_amesh_node_client

## Dependencies (16)

- [chai](https://npm.io/package/chai.md) ^4.1.2
- [jimp](https://npm.io/package/jimp.md) ^0.2.28
- [mocha](https://npm.io/package/mocha.md) ^3.5.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [moment](https://npm.io/package/moment.md) ^2.20.1
- [request](https://npm.io/package/request.md) ^2.83.0
- [ts-node](https://npm.io/package/ts-node.md) ^3.3.0
- [date-utils](https://npm.io/package/date-utils.md) ^1.2.21
- [typescript](https://npm.io/package/typescript.md) ^2.6.2
- [@types/chai](https://npm.io/package/@types/chai.md) ^4.0.10
- [@types/jimp](https://npm.io/package/@types/jimp.md) ^0.2.28
- [@types/node](https://npm.io/package/@types/node.md) ^8.5.2
- [@types/mocha](https://npm.io/package/@types/mocha.md) ^2.2.44
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.91
- [@types/moment](https://npm.io/package/@types/moment.md) ^2.13.0
- [@types/request](https://npm.io/package/@types/request.md) ^2.0.9

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.3.3 (latest) — 2018-02-20
- 0.3.2 — 2018-02-20
- 0.3.1 — 2018-02-20
- 0.3.0 — 2017-12-23
- 0.2.4 — 2017-08-17
- 0.2.3 — 2017-08-16
- 0.2.2 — 2017-08-11
- 0.2.1 — 2017-08-10
- 0.2.0 — 2017-08-10
- 0.1.9 — 2017-08-09
- 0.1.8 — 2017-08-09
- 0.1.7 — 2017-08-09
- 0.1.6 — 2017-08-09
- 0.1.5 — 2017-08-09
- 0.1.4 — 2017-08-09
- … 5 more at https://npm.io/package/tokyo_amesh_node_client/versions

## README

# tokyo-amesh-nodejs-client

## How to use

### install
```
$ npm i tokyo_amesh_node_client
```

### example (TypeScript)
```
import { AmeshClient, ImageSize } from "tokyo_amesh_node_client";

// The easiest way to get amesh image (as Jimp object).
AmeshClient.getLatestImage(ImageSize.Small)
    .then((img) => {
        console.log("Getting amesh image has been finished.");
        console.log(`width: ${img.bitmap.width}, height: ${img.bitmap.height}`);
    });

// You can also download an image as a file.
const fileName = "amesh.png";
AmeshClient.downloadLatestImage(ImageSize.Small, fileName)
    .then((img) => {
        console.log("Image has been downloaded.");
    });

// You can get mesh indecies.
const ameshClient = new AmeshClient();
ameshClient.getMeshIndices()
    .then((indices) => {
        console.log(indices);
    });

// Mesh indices looks like below.
[ '201708101315',
  '201708101310',
  '201708101305',
  '201708101300',
]

// You can get an image using specific mesh index.
ameshClient.getMeshIndices()
    .then((indices) => {
        return ameshClient.getImage(ImageSize.Small, indices[0]);
    })
    .then((img) => {
        console.log("Got an image.");
    });
```

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