fix: PascalCase JSON fields + code:200 success + Unix timestamp ExpDate
This commit is contained in:
@@ -13,9 +13,8 @@ func listOptions() map[string]string {
|
||||
}
|
||||
|
||||
// listResponse is the JSON envelope returned by Rainyun list endpoints.
|
||||
// The API wraps data in {"code":0,"data":{"records":[...],"totalRecords":N}}.
|
||||
// Our client extracts apiResp.Data ({"records":[...]}), then we unmarshal into this.
|
||||
// API uses PascalCase: {"code":200,"data":{"Records":[...],"TotalRecords":N}}
|
||||
type listResponse struct {
|
||||
Records []any `json:"records"`
|
||||
TotalRecords int `json:"totalRecords"`
|
||||
Records []any `json:"Records"`
|
||||
TotalRecords int `json:"TotalRecords"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user