0.3.3 • Published 6 years ago

tokyo_amesh_node_client v0.3.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

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.");
    });
0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

1.0.0

7 years ago