Socket
Socket
Sign inDemoInstall

domainr-node

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

domainr-node

`domainr-node` is a [Domainr](https://domainr.com) API client written for Node that fully supports both the standard and enterprise versions.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

💻 domainr-node

domainr-node is a Domainr API client written for Node that fully supports both the standard and enterprise versions.

Installation

Using npm:

npm install domainr-node

Using yarn:

yarn add domainr-node

Usage

First of all, an API key must be generated. This can be done here.

domainr-client is based entirely on an asynchronous Promise API.

const { DomainrClient } = require("domainr-node");
// alternatively, with modern ES syntax
import { DomainrClient } from "domainr-node";

const client = new DomainrClient("YOUR-API-KEY", {
	// OPTIONAL
	endpoint: "standard", // Use "enterprise" if you have an API key for the high volume API
});
await client.search("pizzashop");
/** => RETURNS
    [
    {
        domain: 'pizza.shop',
        host: '',
        subdomain: 'pizza.',
        zone: 'shop',
        path: '',
        registerURL: 'https://api.domainr.com/v2/register?client_id=mashape-XXX&domain=pizza.shop&gl=de&registrar=&source='
    },
    {
        domain: 'pizza.shopping',
        host: '',
        subdomain: 'pizza.',
        zone: 'shopping',
        path: '',
        registerURL: 'https://api.domainr.com/v2/register?client_id=mashape-XXX&domain=pizza.shopping&gl=de&registrar=&source='
    },
    {
        domain: 'pizza.store',
        host: '',
        subdomain: 'pizza.',
        zone: 'store',
        path: '',
        registerURL: 'https://api.domainr.com/v2/register?client_id=mashape-XXX&domain=pizza.store&gl=de&registrar=&source='
    },
    ...
  ]
*/

status

await client.status("pizzashop.com");
// => [ { domain: 'pizzashop.com', zone: 'com', status: [ 'active' ] } ]

await client.status("JustSomeRandomDomainName.com");
/* => RETURNS
[
  {
    domain: 'JustSomeRandomDomainName.com',
    zone: 'com',
    status: [ 'undelegated', 'inactive' ]
  }
]
*/

register

await client.register("JustSomeRandomDomainName.com");
// => https://iwantmyname.com/partner/search?r=domai.nr&u=XXXXXX&b=XXXXXXX&q=JustSomeRandomDomainName.com

LICENSE

Copyright (C) 2021 Marvin Schopf

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Keywords

FAQs

Package last updated on 12 Mar 2021

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