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

whois-history

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whois-history

Whois History API client for Node.js

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Overview

The client library for Whois History API for Node.js.

The minimum Node.js version is 8.

Installation

The library is distributed via npm

npm install whois-history

Examples

Full API documentation available here

Create a new client

const WhoisHistoryClient = require('whois-history').Client;
const Options = require('whois-history/include/client').Options;

let client = new WhoisHistoryClient(
    'Your API Key'
);

Make basic requests

// Check how many records available. It doesn't deduct credits.
client.preview('whoisxmlapi.com')
    .then(function (data) {
        console.log(data);
    })
    .catch(function (error) {
        console.log(error);
    });

// Get actual list of records.
client.purchase('whoisxmlapi.com')
    .then(function (data) {
        console.log(data);
    })
    .catch(function (error) {
        console.log(error);
    });

Additional options

You can specify search options for these methods.

let date = new Date("2017-01-01")

let options = new Options()

options.sinceDate = date
options.createdDateFrom = date
options.createdDateTo = date
options.updatedDateFrom = date
options.updatedDateTo = date
options.expiredDateFrom = date
options.expiredDateTo = date

client.preview('whoisxmlapi.com', options)
    .then(function (data) {
        console.log(data);
    })
    .catch(function (error) {
        console.log(error);
    });

Using Callback

client.preview('whoisxmlapi.com', new Options(), function (err, res) {
    if (err) {
        console.log(err);
    } else {
        console.log(res);
    }
});

Keywords

FAQs

Package last updated on 12 May 2020

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