|
26 | 26 | ListDomainsRequestOrderBy, |
27 | 27 | ListRenewableDomainsRequestOrderBy, |
28 | 28 | ListTasksRequestOrderBy, |
| 29 | + ListTldsRequestOrderBy, |
29 | 30 | RawFormat, |
30 | 31 | TaskStatus, |
31 | 32 | TaskType, |
|
65 | 66 | ListRenewableDomainsResponse, |
66 | 67 | ListSSLCertificatesResponse, |
67 | 68 | ListTasksResponse, |
| 69 | + ListTldsResponse, |
68 | 70 | Nameserver, |
69 | 71 | NewContact, |
70 | 72 | OrderResponse, |
|
76 | 78 | SSLCertificate, |
77 | 79 | SearchAvailableDomainsResponse, |
78 | 80 | Task, |
| 81 | + Tld, |
79 | 82 | TransferInDomainRequestTransferRequest, |
80 | 83 | UpdateContactRequestQuestion, |
81 | 84 | UpdateDNSZoneNameserversResponse, |
|
152 | 155 | unmarshal_ListRenewableDomainsResponse, |
153 | 156 | unmarshal_ListSSLCertificatesResponse, |
154 | 157 | unmarshal_ListTasksResponse, |
| 158 | + unmarshal_ListTldsResponse, |
155 | 159 | unmarshal_OrderResponse, |
156 | 160 | unmarshal_RefreshDNSZoneResponse, |
157 | 161 | unmarshal_RegisterExternalDomainResponse, |
@@ -2487,6 +2491,78 @@ async def search_available_domains( |
2487 | 2491 | self._throw_on_error(res) |
2488 | 2492 | return unmarshal_SearchAvailableDomainsResponse(res.json()) |
2489 | 2493 |
|
| 2494 | + async def list_tlds( |
| 2495 | + self, |
| 2496 | + *, |
| 2497 | + tlds: Optional[List[str]] = None, |
| 2498 | + page: Optional[int] = None, |
| 2499 | + page_size: Optional[int] = None, |
| 2500 | + order_by: ListTldsRequestOrderBy = ListTldsRequestOrderBy.NAME_ASC, |
| 2501 | + ) -> ListTldsResponse: |
| 2502 | + """ |
| 2503 | + List TLD offers. |
| 2504 | + Retrieve the list of TLDs and offers associated with them. |
| 2505 | + :param tlds: Array of TLDs to return. |
| 2506 | + :param page: Page number for the returned Projects. |
| 2507 | + :param page_size: Maximum number of Project per page. |
| 2508 | + :param order_by: Sort order of the returned TLDs. |
| 2509 | + :return: :class:`ListTldsResponse <ListTldsResponse>` |
| 2510 | +
|
| 2511 | + Usage: |
| 2512 | + :: |
| 2513 | +
|
| 2514 | + result = await api.list_tlds() |
| 2515 | + """ |
| 2516 | + |
| 2517 | + res = self._request( |
| 2518 | + "GET", |
| 2519 | + f"/domain/v2beta1/tlds", |
| 2520 | + params={ |
| 2521 | + "order_by": order_by, |
| 2522 | + "page": page, |
| 2523 | + "page_size": page_size or self.client.default_page_size, |
| 2524 | + "tlds": tlds, |
| 2525 | + }, |
| 2526 | + ) |
| 2527 | + |
| 2528 | + self._throw_on_error(res) |
| 2529 | + return unmarshal_ListTldsResponse(res.json()) |
| 2530 | + |
| 2531 | + async def list_tlds_all( |
| 2532 | + self, |
| 2533 | + *, |
| 2534 | + tlds: Optional[List[str]] = None, |
| 2535 | + page: Optional[int] = None, |
| 2536 | + page_size: Optional[int] = None, |
| 2537 | + order_by: Optional[ListTldsRequestOrderBy] = None, |
| 2538 | + ) -> List[Tld]: |
| 2539 | + """ |
| 2540 | + List TLD offers. |
| 2541 | + Retrieve the list of TLDs and offers associated with them. |
| 2542 | + :param tlds: Array of TLDs to return. |
| 2543 | + :param page: Page number for the returned Projects. |
| 2544 | + :param page_size: Maximum number of Project per page. |
| 2545 | + :param order_by: Sort order of the returned TLDs. |
| 2546 | + :return: :class:`List[ListTldsResponse] <List[ListTldsResponse]>` |
| 2547 | +
|
| 2548 | + Usage: |
| 2549 | + :: |
| 2550 | +
|
| 2551 | + result = await api.list_tlds_all() |
| 2552 | + """ |
| 2553 | + |
| 2554 | + return await fetch_all_pages_async( |
| 2555 | + type=ListTldsResponse, |
| 2556 | + key="tlds", |
| 2557 | + fetcher=self.list_tlds, |
| 2558 | + args={ |
| 2559 | + "tlds": tlds, |
| 2560 | + "page": page, |
| 2561 | + "page_size": page_size, |
| 2562 | + "order_by": order_by, |
| 2563 | + }, |
| 2564 | + ) |
| 2565 | + |
2490 | 2566 | async def create_domain_host( |
2491 | 2567 | self, |
2492 | 2568 | *, |
|
0 commit comments