### Install Realtime Register TypeScript SDK Source: https://github.com/realtimeregister/realtimeregister-ts/blob/main/README.md Installs the official TypeScript SDK for the Realtime Register REST API using pnpm. This is the first step to using the SDK in your project. ```bash pnpm add @realtimeregister/api ``` -------------------------------- ### Get TLD Metadata with Realtime Register API Source: https://github.com/realtimeregister/realtimeregister-ts/blob/main/README.md Fetches metadata for a specific Top-Level Domain (TLD) using the Realtime Register API client. Handles successful responses and potential authentication errors. ```typescript // Get TLD metadata rtr.tld.info('nl').then((response) => { console.log(response) //Metadata(hash=..., applicableFor=..., metadata=..., provider=...) console.log(response.metadata) // {....} }).catch((err) => { if (err instanceof AuthenticationError) { console.log('Authentication error') } }) ``` -------------------------------- ### Initialize Realtime Register API Client Source: https://github.com/realtimeregister/realtimeregister-ts/blob/main/README.md Initializes the Realtime Register API client with an API key and customer handle. This client instance is then used to make requests to the API. ```typescript const rtr = new RealtimeRegisterAPI({ apiKey: 'YOUR_API_KEY', customer: 'YOUR_CUSTOMER_HANDLE' }) ``` -------------------------------- ### Import Realtime Register API in TypeScript Source: https://github.com/realtimeregister/realtimeregister-ts/blob/main/README.md Demonstrates how to import the Realtime Register API client and specific exceptions in a TypeScript project. Supports both ES module and CommonJS import styles. ```typescript import RealtimeRegisterAPI from '@realtimeregister/api' import { AuthenticationError } from '@realimeregister/api/exceptions' ``` ```javascript const RealtimeRegisterAPI = require('@realtimeregister/api').default const { AuthenticationError } = require('@realtimeregister/api/exceptions') ``` -------------------------------- ### Check Domain Availability with Realtime Register API Source: https://github.com/realtimeregister/realtimeregister-ts/blob/main/README.md Checks the availability and pricing of a domain name using the Realtime Register API client. The response includes availability status, price, and currency. ```typescript // Check domain rtr.domains.check('testdomain.com').then((response) => { console.log(response) /* { * available: false, * reason: 'test', premium: false, currency: 'USD', price: 3000 * } */ }) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.