A node wrapper for the Netcup CCP API.

Overview

Netcup-node

codecov Known Vulnerabilities build Maintainability Rating Bugs Code Smells GitHub last commit npm npm

A node wrapper for the Netcup CCP API.

Current support

  • only JSON Rest API, no SOAP yet
  • auto auth handling with support to use custom auth handling
  • functions
    • login
    • infoDnsZone
    • infoDnsRecord
    • updateDnsRecords
    • updateDnsRecordWithCurrentIp to set the current public ip as destination. Works with ipv4 and ipv6. Default updates ipv4 only. Set parameter useIpv6Only to true to update ipv6 only. Set parameter useIpv4AndIpv6 to true to update both ipv4 and ipv6. NOTE: Uses public-ip package to get the current public ip.
  • error handling: on any response that isn't 2000 from Netcup, an error with the longmessage from Netcup is thrown

ToDo

  • login
  • infoDnsZone
  • infoDnsRecord
  • updateDnsRecords (0.0.5)
  • updateDnsRecordWithCurrentIp (0.0.6)
  • logout
  • reseller api functions
  • different formats

Getting started

Installation

npm install --save netcup-node

Authentication

You will also need three things from Netcup CCP:

  • apikey
  • apipassword
  • customernumber

After logging in to Netcup CCP, navigate to Stammdaten and create the key/password there. The customernumber is next to your name at the top of the CCP.

Usage

The default exported NetcupApi is a wrapper around the actual api. It handles authentication and passes parameters to the implemented api.

import NetcupApi from 'netcup-node';
const api = await new Netcup().init({
  apikey: 'YOUR_API_KEY',
  apipassword: 'YOUR_API_PASSWORD',
  customernumber: 'YOUR_CUSTOMER_NUMBER',
});
const dnsInfo = await api.infoDnsZone({ domainname: 'YOUR.DOMAIN' });

If you prefer, you can use the NetcupRestApi directly, without using the integrated authentication state handling from the default exported NetcupApi.

import { NetcupRestApi } from 'netcup-node';
const api = new NetcupRestApi();
const authResponse = await api.login({
  apikey: '',
  apipassword: '',
  customernumber: '',
});
const dnsRecords = await api.infoDnsRecords({
  apisessionid: authResponse.responsedata.apisessionid,
  apikey: 'YOUR_API_KEY',
  customernumber: 'YOUR_CUSTOMER_NUMBER',
  domainname: 'YOUR.DOMAIN',
});
You might also like...

Programmers House api official wrapper

programmershouse-wrapper Programmers House api official wrapper Install: npm install programmershouse-wrapper Example of using: With .then //importing

Mar 23, 2022

A Roblox OpenCloud API wrapper for Deno (and NodeJS) written in TypeScript.

Active Development This module is currently in active development. Nothing is going to stay consistent as it reaches a stable release. Dynablox Docs |

Oct 28, 2022

API wrapper for plutu.ly

Plutu-TS A tiny client for the plutu.ly API written in Typescript. ✨ Features: Tiny 1KB size gzip Works in Node.js and in Browser Built-in Typescript

May 2, 2022

🍬 Tixte Developer API Wrapper

Tixte Wrapper The best Tixte wrapper around This package was done because I wanted to use the Tixte API in a hackathon, there were already 2 packages

Apr 6, 2022

A JavaScript wrapper for the Salad.io API!

A JavaScript wrapper for the Salad.io API!

SaladWrap A lightweight wrapper for the Salad.io API Quick Links Installation Code Example Console Output Maintainers Installation Install saladwrap.j

Apr 17, 2022

A wrapper client for Strike's public API.

node-strike A wrapper client for Strike's public API. Usage Import the wrapper and instantiate a client. import { NodeStrike } from 'node-strike'; //

Apr 28, 2022

API wrapper for plutu.ly

Plutu-TS A tiny client for the plutu.ly API written in Typescript. ✨ Features: Tiny 1KB size gzip Works in Node.js and in Browser Built-in Typescript

May 2, 2022

A simple, easy to use wrapper for Hypixel API.

A simple, easy to use wrapper for Hypixel API.

An easy to use Hypixel API wrapper. About hypixel.ts is a NodeJS module which allows you to interact with the Hypixel API easily. Written in Typescrip

Dec 18, 2022

neverlose.cc market api wrapper

neverlose.cc market api wrapper

Neverlose.cc API This is the neverlose.cc market api wrapper written on node.js(ts) Getting started Install for npm npm install neverlose-api Then you

Feb 2, 2022
Releases(v0.0.12)
Owner
Direnc Timur
Web dev | metal head | anime enthusiast
Direnc Timur
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
An unofficial wrapper for the Bloxlink API using Node.js

Bloxlink API wrapper ?? Bloxlink-sdk is a simple, easy to use API wrapper for Bloxlinks API using Node.js. Anyone who can use code should be fairly co

Callum Sequoia 3 Oct 21, 2022
An open source API wrapper for TechHost API.

TechHost API Wrapper An open source API wrapper for TechHost API. Badges Installation Install techhost-api-wrapper with npm. npm install techhost-api-

Eight∞ 4 Jun 23, 2022
News API Wrapper for Violetics API News

News API Wrapper for Violetics API News

Violetics 3 Mar 23, 2022
A wrapper for valorant-api, a third-party API for getting data within Valorant. Available on npm

valorant-wrapper A wrapper for the third-party valorant-api How to Use All endpoints can be accessed off the ValAPI class. import { ValAPI } from 'val

Aircraft Overviewer 5 Nov 7, 2022
Shopee Affiliate Wrapper for Node.js

shpee Javascript Wrapper for Shopee Affiliate API Installation Use the package manager npm to install shpee. npm install shpee Usage # shopee_client.j

Ngalim Siregar 5 Dec 1, 2022
An ADB wrapper made in node js. For mobile debugging

Adb-Wrapper An awesome ADB wrapper made in node js to use adb just with functions. · Report Bug · Request Feature Table of Contents About The Project

Amir Alam 4 Dec 17, 2022
A tiny spawn wrapper for Node.js

tinysh A tiny spawn wrapper for Node.js. const {ls, curl} = require('tinysh') const list = ls('-la').trim().split('\n') const resp = curl('https://m

Anton Medvedev 50 Dec 8, 2022
Tiny Telegra.ph API wrapper for Deno

Telegra.ph API wrapper for Deno ?? This is a tiny Telegra.ph API wrapper for Deno written in TypeScript. All methods as listed here are available. See

Dunkan 9 Jul 28, 2022