Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tineye-api

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tineye-api

TinEye API node.js library

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2K
decreased by-4.67%
Maintainers
1
Weekly downloads
 
Created
Source

tineye-api

TinEye API Node.js library

Installation

$ npm install tineye-api

Using the library

Once installed, require the library to start using it:

var TinEye = require('tineye-api')

Once required, you are ready to start using it with Node!

If the callback argument is omitted, the method will return a promise instead.

var api = new TinEye('https://api.tineye.com/rest/', public_key, private_key);

Searching using an image URL

var url = 'https://tineye.com/images/meloncat.jpg';
var params = {
  'offset': 0,
  'limit': 10,
  'sort': 'score',
  'order': 'desc'
};
api.searchUrl(url, params)
  .then(function(response) {
    console.log(response);
  })
  .catch(function(error) {
    console.log(error);
  });

Searching using image data

var img = fs.readFileSync('/Users/Mypath/image.jpg');
var params = {
  'offset': 0,
  'limit': 10,
  'sort': 'size',
  'order': 'asc'
};
api.searchData(img, params)
  .then(function(response) {
    console.log(response);
  })
  .catch(function(error) {
    console.log(error);
  });

Remaining Searches

api.remainingSearches()
  .then(function(response) {
    console.log(response);
  })
  .catch(function(error) {
    console.log(error);
  });

Number of Indexed Images

api.imageCount()
  .then(function(response) {
    console.log(response);
  })
  .catch(function(error) {
    console.log(error);
  });

Release History

1.0.2

  • Switched hashing algorithm from SHA1 to SHA256
  • Switched README from reStructuredText to Markdown

1.0.1

  • Cleaning up some code and comments
  • Some error handling fixes

1.0.0

  • Adding promises
  • Better error handling
  • Switched method names to camelCasing
  • searchUrl and searchData now take an option array

0.1.0

  • Initial release

Keywords

FAQs

Package last updated on 19 Sep 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc