juandiii / namecom-api

Unofficial Name.com API V4 Support Java 11 and above

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌎 Name.com Library

Supported Java 11 and above GitHub Workflow Status

Unofficial Name.com library for Java is an API V4 Rest is accessed over HTTPS. You can use to consuming resources through API Name.com

This is used by the library HTTP client also known as Resteasy

βš™οΈ Configuration

You need to set configuration the properties username, token and set them properly. Name.com gives your credentials.

Key Description Required
username Username of Name.com βœ…
token Secret token of Name.com βœ…

πŸ“„ Example

We have two options for synchronous and asynchronous for some application you can use imperative programming or reactive programming. In my case I do to set reactive programming with Smallrye Mutiny with the framework Quarkus

πŸ‘¨πŸ»β€πŸ’» Example usage (Sync)

// Get an instance
Name client = Name.getInstance("username", "token-123");
// Consuming an endpoint
// Get all domains
ListDomain domains = client.domains().getDomains();

πŸ‘¨πŸ»β€πŸ’» Example usage (asynchronous)

// Get an instance asynchronous
NameAsync name = NameAsync.getInstance("username", "token-123");
// Get List domain in asynchronous
CompletionStage<ListDomain> domains = name.async().getDomains();
domains.whenComplete((listDomain, throwable) -> {
  listDomain.getDomains().forEach(domain -> System.out.println(domain.getDomainName()));
});

πŸ˜‡ Contribution

To be honest

About

Unofficial Name.com API V4 Support Java 11 and above

License:MIT License


Languages

Language:Java 100.0%