いらすとや (http://www.irasutoya.com/) client
NOTE: Irasutoya is a famous free illustration material service in Japan.
npm install irasutoya
const irasutoya = require("irasutoya");
(async () => {
const imgInfo = await irasutoya.randomImage();
console.log(imgInfo.title); // => 整えられたヒゲのイラスト
console.log(imgInfo.description); // => 上品に整えられた、きれいに髭を生やした男性のイラストです。
console.log(imgInfo.imageUrl); // => https://.../hige_kirei.png
console.log(imgInfo.categories); // => ["マナー", "美容"]
})();
const images = await irasutoya.search("猫");
console.log(images[0]); // => { title: "猫の魚屋のイラスト", imageUrl: "https://...", }
const server = new irasutoya.Server();
server.listen();
or run the following script:
$ irasutoya-server
End Point | Parameter | Description |
---|---|---|
GET /random |
(optional)raw [bool]: the response becomes a raw image if true |
Get a random image |
GET /search |
query [string]: a search query |
Search images by the query |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
irasutoya is released under the MIT license. See LICENSE for details.
いらすとや, Thank you for wonderful illustrations!