// Runnable example: Newly Registered gTLD (JSON) (GET /v3.1/domains/newly/gtld) // Run it from the Getting Started project: gradle run -PmainClass=DbNewlyGtldJsonKt // Parameters for dbNewlyGtldJson (GET /v3.1/domains/newly/gtld): // - date (string, optional): yyyy-MM-dd; omit for latest // - tlds (string, optional) import com.whoisfreaks.client.apis.DatabasesNewlyRegisteredApi import com.whoisfreaks.client.infrastructure.ApiClient import java.time.LocalDate fun main() { ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call val api = DatabasesNewlyRegisteredApi() val result = api.dbNewlyGtldJson(date = LocalDate.of(2026, 10, 1)) println(result) }