google-domains

0.0.3 • Public • Published

Google Domains

npm version ndoe version github tag monthly downloads license contributions welcome

Get Google domains.

Requirements

Item Details
System GNU/Linux (>=2.6.x), macOS (>=10.10.x), Windows (later than XP)
Environment Node.js >= 8.2.0

Installation

# under product mode 
$ npm install google-domains --save
 
# under development mode 
$ npm install google-domains --save-dev

Quick Start

After you finished the installation above, you will have a package google-domains in your ./node_modules directory.

Import

Default module exports in CommonJS style

const GoogleDomains = require('google-domains');
const googleDomains = new GoogleDomains();

Usages

googleDomains.fetch()

Returns a Promise object that contains all known Google domains.

Recommanded usage:

let data;
try {
  data = await googleDomains.fetch();
} catch (error) {
  throw new Error(error);
}

or alternatively:

googleDomains.fetch()
          .then(function (data) {
            // get proxies here
          })
          .catch(function (error) {
            throw new Error(error);
          });
googleDomains.random()

Get an object of Google domain information randomly.

Recommanded usage:

let data;
try {
  data = await googleDomains.random();
} catch (error) {
  throw new Error(error);
}

or alternatively:

googleDomains.random()
          .then(function (data) {
            // get data here
          })
          .catch(function (error) {
            throw new Error(error);
          });
googleDomains.randomUrl()

Get a string of Google url randomly.

Recommanded usage:

let data;
try {
  data = await googleDomains.randomUrl();
} catch (error) {
  throw new Error(error);
}

or alternatively:

googleDomains.randomUrl()
          .then(function (data) {
            // get data here
          })
          .catch(function (error) {
            throw new Error(error);
          });

Tests

To run the test suite, go to the root directory of this package, and install dependencies, and then run npm test or npm run test:

cd /path/to/google-domains
$ npm install
$ npm test
# or 
$ npm run test

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i google-domains

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

8.82 kB

Total Files

7

Last publish

Collaborators

  • lenconda