Socket
Socket
Sign inDemoInstall

everypixel

Package Overview
Dependencies
10
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    everypixel

JavaScript support for EveryPixel API


Version published
Maintainers
1
Install size
871 kB
Created

Readme

Source

Welcome to EveryPixel API 👋

Version Documentation Maintenance License: MIT Twitter: BlueT

JavaScript client support for EveryPixel API, works in both Node.js and Browser.

🏠 Homepage

Install

npm i everypixel

Usage

const EveryPixel = require('everypixel');

const api = new EveryPixel({
	"username": "<your-client-id>",
	"password": "<your-client-secret>"
});

// Get 10 suggested keywords of online image
let ret = await api.keywords({"url": "http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg", "num_keywords": 10});
console.log(ret.data);
// Get 10 suggested keywords of local image file
let ret = await api.keywords({"data": fs.createReadStream("t/cat.jpg"), "num_keywords": 10});
console.log(ret.data);

keywords

await api.keywords({"url": "http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg", "num_keywords": 10});
await api.keywords({"data": fs.createReadStream(appRoot + "/t/cat.jpg"), "num_keywords": 10});

quality

await api.quality({"url": "http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg"});
await api.quality({"data": fs.createReadStream(appRoot + "/t/cat.jpg")});

quality_ugc

await api.quality_ugc({"url": "http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg"});
await api.quality_ugc({"data": fs.createReadStream(appRoot + "/t/cat.jpg")});

faces

await api.faces({"url": "https://labs.everypixel.com/api/static/i/estest_sample3.jpg"});
await api.faces({"data": fs.createReadStream(appRoot + "/t/face.jpg")});

Run tests

Because EveryPixel doesn't provide free test account, you need to signup at https://labs.everypixel.com/api and get your client tokens with 100 daily free quota of api calls.

Please modify t/test.js and update your token info BEFORE running test.

npm run test

Author

👤 BlueT - Matthew Lien - 練喆明 <BlueT@BlueT.org>

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

support us

📝 License

Copyright © 2019 BlueT - Matthew Lien - 練喆明 <BlueT@BlueT.org>.

This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

Keywords

FAQs

Last updated on 03 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc