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

@rqt/namecheap-web

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rqt/namecheap-web - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

5

build/coupon.js
let rqt = require('rqt'); if (rqt && rqt.__esModule) rqt = rqt.default;
const coupon = async (USER_AGENT) => {
const s = await rqt('https://www.namecheap.com/promos/coupons/', {
const coupon = async (USER_AGENT, sandbox) => {
const h = sandbox ? 'sandbox.' : ''
const s = await rqt(`https://www.${h}namecheap.com/promos/coupons/`, {
headers: {

@@ -6,0 +7,0 @@ 'User-Agent': USER_AGENT,

@@ -57,2 +57,8 @@ const { debuglog } = require('util');

}
/**
* Return the coupon from the https://www.sandbox.namecheap.com/promos/coupons/ page.
*/
static async SANDBOX_COUPON() {
return coupon(USER_AGENT, true)
}

@@ -59,0 +65,0 @@ async auth(username, password, phone, force) {

4

CHANGELOG.md
## 6 October 2018
### 1.3.0
- [feature] Retrieve sandbox coupon codes.
### 1.2.0

@@ -4,0 +8,0 @@

{
"name": "@rqt/namecheap-web",
"version": "1.2.0",
"version": "1.3.0",
"description": "An API to namecheap.com via the web interface, with an ability to log in using 2-factor Auth and check Whois.",

@@ -5,0 +5,0 @@ "main": "build",

@@ -25,2 +25,3 @@ [![namecheap](https://raw.githubusercontent.com/rqt/namecheap-web/HEAD/images/nc.gif)](https://nameexpensive.com)

* [`async static COUPON(): string`](#async-static-coupon-string)
* [`async static SANDBOX_COUPON(): string`](#async-static-sandbox_coupon-string)
* [`async getWhitelistedIPList(username: string, password: string, phone?: string): WhitelistedIP[]`](#async-getwhitelistediplistusername-stringpassword-stringphone-string-whitelistedip)

@@ -175,2 +176,25 @@ * [`WhitelistedIP`](#type-whitelistedip)

### `async static SANDBOX_COUPON(): string`
Returns this month's coupon from the https://www.sandbox.namecheap.com/promos/coupons/ page.
```js
/* yarn example/whois.js */
import NamecheapWeb from '@rqt/namecheap-web'
(async () => {
try {
const res = await NamecheapWeb.SANDBOX_COUPON()
console.log(res)
} catch ({ message }) {
console.error(message)
}
})()
```
```
CAMPUSTLD
```
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/6.svg?sanitize=true" width="15"></a></p>
### `async getWhitelistedIPList(`<br/>&nbsp;&nbsp;`username: string,`<br/>&nbsp;&nbsp;`password: string,`<br/>&nbsp;&nbsp;`phone?: string,`<br/>`): WhitelistedIP[]`

@@ -188,3 +212,3 @@

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/6.svg?sanitize=true" width="15"></a></p>
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/7.svg?sanitize=true" width="15"></a></p>

@@ -195,3 +219,3 @@ ### `async whitelistIP(`<br/>&nbsp;&nbsp;`ip: string,`<br/>&nbsp;&nbsp;`name?: string,`<br/>`): void`

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/7.svg?sanitize=true" width="15"></a></p>
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/8.svg?sanitize=true" width="15"></a></p>

@@ -202,3 +226,3 @@ ### `async removeWhitelistedIP(`<br/>&nbsp;&nbsp;`name: string,`<br/>`): void`

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/8.svg?sanitize=true"></a></p>
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/9.svg?sanitize=true"></a></p>

@@ -205,0 +229,0 @@

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