Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
google-image
Advanced tools
Readme
Find image data using the deprecated Google Image Search API. Google has disabled the API. As such, this module is no longer functional.
Array.<imageData>
Response data results
Object.<string, function()>
Image data extended with the image's filename and convenience methods
Find image data using the deprecated Google Image Search API. Google has disabled the API. As such, this module is no longer functional.
Author: Matthew Hasbach
License: MIT
Copyright: Matthew Hasbach 2015
Example
new googleImage('car')
.quantity(5)
.page(2)
.search()
.then(function(images) {
images[0].save(path.join(__dirname, images[0].fileName)).then(function() {
console.log('done');
}).catch(function(err) {
console.error(err);
});
}).catch(function(err) {
console.error(err);
});
Kind: inner class of node-google-image
Kind: global class
Param | Type | Description |
---|---|---|
[q] | string | A search query. This may be omitted and supplied later using the options or search method. |
Promise
Set the desired size of the result set
Kind: instance method of node-google-image
Chainable
Param | Type | Description |
---|---|---|
quantity | number | The result set size |
Set the desired page number
Kind: instance method of node-google-image
Chainable
Param | Type | Description |
---|---|---|
page | number | The page number |
Set Google Image Search API options
Kind: instance method of node-google-image
Chainable
Param | Type | Description |
---|---|---|
opt | Object | API options |
Promise
Search for images. The default page and quantity are 0 and 1, respectively.
Kind: instance method of node-google-image
Param | Type | Description |
---|---|---|
[opt] | Object | API options |
[cb] | callback | A callback to be executed once the search is complete |
Array.<imageData>
Response data results
Object.<string, function()>
Image data extended with the image's filename and convenience methods
Kind: global typedef
Object.<string, function()>
string
Promise
function
Promise
function
string
Image filename
Kind: instance property of imageData
Promise
Download an image
Kind: instance method of imageData
Param | Type | Description |
---|---|---|
[cb] | callback | A callback to be executed once the download is complete |
function
Kind: inner typedef of download
Param | Type | Description |
---|---|---|
err | Error | null | An error if one was encountered |
imageData | Buffer | undefined | Image data |
Promise
Save an image
Kind: instance method of imageData
Param | Type | Description |
---|---|---|
path | string | A callback to be executed once the image has been saved |
[cb] | callback | A callback to be executed once the image has been saved |
function
Kind: inner typedef of save
Param | Type | Description |
---|---|---|
err | Error | null | An error if one was encountered |
FAQs
Find image data using the deprecated Google Image Search API
The npm package google-image receives a total of 1 weekly downloads. As such, google-image popularity was classified as not popular.
We found that google-image 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.