Skip to content

Commit 82bcd6e

Browse files
chore: regenerate CLI from OpenAPI spec
1 parent 49becd6 commit 82bcd6e

6 files changed

Lines changed: 209 additions & 0 deletions

File tree

client/client.gen.go

Lines changed: 145 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/domains/portfolio/portfolio.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ func init() {
1717
GroupCmd.AddCommand(GetCmd)
1818
GroupCmd.AddCommand(ListCmd)
1919
GroupCmd.AddCommand(PurchaseCmd)
20+
GroupCmd.AddCommand(RenewalInformationCmd)
2021
GroupCmd.AddCommand(UpdateNameserversCmd)
2122
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package portfolio
2+
3+
import (
4+
"context"
5+
"log"
6+
7+
"github.com/hostinger/api-cli/api"
8+
"github.com/hostinger/api-cli/output"
9+
"github.com/spf13/cobra"
10+
)
11+
12+
var RenewalInformationCmd = &cobra.Command{
13+
Use: "renewal-information <domain>",
14+
Short: "Get domain renewal information",
15+
Long: "Retrieve renewal information for a specified domain, including its status and current\nexpiration date.\n\nUse this endpoint to build renewal automation and expiry monitoring for a single domain.",
16+
Args: cobra.MatchAll(cobra.ExactArgs(1)),
17+
Run: func(cmd *cobra.Command, args []string) {
18+
r, err := api.Request().DomainsGetDomainRenewalInformationV1WithResponse(context.TODO(), args[0])
19+
if err != nil {
20+
log.Fatal(err)
21+
}
22+
23+
output.Format(cmd, r.Body, r.StatusCode())
24+
},
25+
}

docs/hostinger_domains_portfolio.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ Portfolio commands
2525
* [hostinger domains portfolio get](hostinger_domains_portfolio_get.md) - Get domain details
2626
* [hostinger domains portfolio list](hostinger_domains_portfolio_list.md) - Get domain list
2727
* [hostinger domains portfolio purchase](hostinger_domains_portfolio_purchase.md) - Purchase new domain
28+
* [hostinger domains portfolio renewal-information](hostinger_domains_portfolio_renewal-information.md) - Get domain renewal information
2829
* [hostinger domains portfolio update-nameservers](hostinger_domains_portfolio_update-nameservers.md) - Update domain nameservers
2930

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## hostinger domains portfolio renewal-information
2+
3+
Get domain renewal information
4+
5+
### Synopsis
6+
7+
Retrieve renewal information for a specified domain, including its status and current
8+
expiration date.
9+
10+
Use this endpoint to build renewal automation and expiry monitoring for a single domain.
11+
12+
```
13+
hostinger domains portfolio renewal-information <domain> [flags]
14+
```
15+
16+
### Options
17+
18+
```
19+
-h, --help help for renewal-information
20+
```
21+
22+
### Options inherited from parent commands
23+
24+
```
25+
--config string Config file (default is $HOME/.hostinger.yaml)
26+
--format string Output format type (json|table|tree), default: table
27+
```
28+
29+
### SEE ALSO
30+
31+
* [hostinger domains portfolio](hostinger_domains_portfolio.md) - Portfolio commands
32+

manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,11 @@
504504
"method": "GET",
505505
"path": "/api/domains/v1/portfolio"
506506
},
507+
"domains_getDomainRenewalInformationV1": {
508+
"command": "hostinger domains portfolio renewal-information",
509+
"method": "GET",
510+
"path": "/api/domains/v1/portfolio/{domain}/renewal"
511+
},
507512
"domains_getWHOISProfileListV1": {
508513
"command": "hostinger domains whois list",
509514
"method": "GET",

0 commit comments

Comments
 (0)