Socket
Socket
Sign inDemoInstall

google-image

Package Overview
Dependencies
69
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    google-image

Find image data using the deprecated Google Image Search API


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
4.60 MB
Created
Weekly downloads
 

Readme

Source

Modules

node-google-image

Find image data using the deprecated Google Image Search API. Google has disabled the API. As such, this module is no longer functional.

Classes

node-google-image

Typedefs

responseDataResults : Array.<imageData>

Response data results

imageData : Object.<string, function()>

Image data extended with the image's filename and convenience methods

node-google-image

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);
    });

node-google-image~googleImage

Kind: inner class of node-google-image

node-google-image

Kind: global class

ParamTypeDescription
[q]stringA search query. This may be omitted and supplied later using the options or search method.

node-google-image.quantity(quantity) ↩︎

Set the desired size of the result set

Kind: instance method of node-google-image
Chainable

ParamTypeDescription
quantitynumberThe result set size

node-google-image.page(page) ↩︎

Set the desired page number

Kind: instance method of node-google-image
Chainable

ParamTypeDescription
pagenumberThe page number

node-google-image.options(opt) ↩︎

Set Google Image Search API options

Kind: instance method of node-google-image
Chainable

ParamTypeDescription
optObjectAPI options

node-google-image.search([opt], [cb]) ⇒ Promise

Search for images. The default page and quantity are 0 and 1, respectively.

Kind: instance method of node-google-image

ParamTypeDescription
[opt]ObjectAPI options
[cb]callbackA callback to be executed once the search is complete

responseDataResults : Array.<imageData>

Response data results

Kind: global typedef

imageData : Object.<string, function()>

Image data extended with the image's filename and convenience methods

Kind: global typedef

imageData.fileName : string

Image filename

Kind: instance property of imageData

imageData.download([cb]) ⇒ Promise

Download an image

Kind: instance method of imageData

ParamTypeDescription
[cb]callbackA callback to be executed once the download is complete

download~callback : function

Kind: inner typedef of download

ParamTypeDescription
errError | nullAn error if one was encountered
imageDataBuffer | undefinedImage data

imageData.save(path, [cb]) ⇒ Promise

Save an image

Kind: instance method of imageData

ParamTypeDescription
pathstringA callback to be executed once the image has been saved
[cb]callbackA callback to be executed once the image has been saved

save~callback : function

Kind: inner typedef of save

ParamTypeDescription
errError | nullAn error if one was encountered

Keywords

FAQs

Last updated on 17 Dec 2015

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