Skip to content

b3-business/hostingde

Repository files navigation

@b3-business/hostingde

A tree-shakeable API client for hosting.de built on top of @b3-business/cherry.

Installation

npm install @b3-business/hostingde
# or
pnpm add @b3-business/hostingde
# or
bun add @b3-business/hostingde

Quick start

import { createHostingDeClient, zonesFind } from "@b3-business/hostingde";

const client = createHostingDeClient({
  apiToken: process.env.HOSTING_DE_API_TOKEN!,
  routes: { zonesFind },
});

const result = await client.zonesFind({ limit: 10 });

API characteristics

hosting.de has a few special API rules, handled automatically by this client:

  • All endpoints are POST
  • authToken must be sent in the JSON body
  • Responses are wrapped ({ status, response, metadata, errors, warnings })

Available DNS routes

  • zonesFind
  • zoneConfigsFind
  • recordsFind
  • nameserverSetsFind
  • templatesFind
  • zoneUpdate

Development

Install and type-check:

bun install
bun run typecheck

Run tests:

bun test

bun test includes live DNS integration tests from test/dns-integration.test.ts. These tests fail fast if HOSTING_DE_API_TOKEN_TEST1 is missing.

Before running tests, copy .env.example to .env and set:

  • HOSTING_DE_API_TOKEN_TEST1 (required for tests)
  • optionally HOSTINGDE_API_DEMO_HOST / HOSTINGDE_API_HOST (host overrides)

Build:

bun run build

License

MIT

About

Tree-shakeable hosting.de API client built on @b3-business/cherry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors