Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
tineye-api
Advanced tools
tineye-api is the official Node.js library for the TinEye API. The TinEye API is TinEye's paid reverse image search solution for professional, commercial or high-volume users. See https://api.tineye.com/ for more information.
Install the latest version of the library using npm:
$ npm install tineye-api
If you were using any version of the TinEye API library before 2.0.0
, you will need
to make minor changes to your code.
The API object is now instantiated using a single key, api_key
. The value
of this key is the same as your previous private_key
. The public key is no
longer used.
// Sandbox key
// Note that this is the same value as the old private_key
var apiKey = "6mm60lsCNIB,FwOWjJqA80QZHh9BMwc-ber4u=t^";
var api = new TinEye("https://api.tineye.com/rest/", apiKey);
// Sandbox keys
var publicKey = "LCkn,2K7osVwkX95K4Oy";
var privateKey = "6mm60lsCNIB,FwOWjJqA80QZHh9BMwc-ber4u=t^";
var api = new TinEye("https://api.tineye.com/rest/", publicKey, privateKey);
After installation, require
the library to start using it:
var TinEye = require("tineye-api");
Now that you've required the library, you can use it to create an instance of the API object.
var api = new TinEye("https://api.tineye.com/rest/", "yourApiKey");
Be sure to populate api_key
with your own key. You can test your code
with our API sandbox keys, but
you won't get real search results until you start using your real keys.
Once you have an api
object, you can start searching. You can submit an image using either an
image URL or by submitting image data
by uploading an image file. You can also check the number of remaining searches
in your account or check the number of images in the TinEye index.
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);
});
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);
});
api
.remainingSearches()
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
api
.imageCount()
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
git
folder from .gitignore
searchUrl
and searchData
now take an option arrayFAQs
TinEye API node.js library
The npm package tineye-api receives a total of 3,884 weekly downloads. As such, tineye-api popularity was classified as popular.
We found that tineye-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.