From 2605bf350c90dc8eb3f7680692d360eb049f503b Mon Sep 17 00:00:00 2001 From: Fendy Date: Mon, 3 Aug 2026 12:52:14 +0800 Subject: [PATCH] update website link and add todo --- apis/common/common_types.go | 8 ++++++++ apis/public/get_app_config.go | 2 ++ apis/public/get_news.go | 2 ++ apis/public/get_status.go | 12 +++++++++++- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 apis/common/common_types.go diff --git a/apis/common/common_types.go b/apis/common/common_types.go new file mode 100644 index 0000000..e52bdd2 --- /dev/null +++ b/apis/common/common_types.go @@ -0,0 +1,8 @@ +package common + +type StandQueryParameters struct { + ColumnFilters struct{} `json:"columnFilters"` + Sort []any `json:"sort"` + Page int `json:"page"` + PerPage int `json:"perPage"` +} diff --git a/apis/public/get_app_config.go b/apis/public/get_app_config.go index 4e4627b..aad4346 100644 --- a/apis/public/get_app_config.go +++ b/apis/public/get_app_config.go @@ -2,6 +2,8 @@ package public import "github.com/XingfenD/rainyun_api_go_sdk/constant" +// https://api.rainyun.com/#/paths/app_config/get + type GetAppConfigResponse struct { Code int `json:"code"` Data []AppConfigItem `json:"data"` diff --git a/apis/public/get_news.go b/apis/public/get_news.go index 8e75c43..c86aca1 100644 --- a/apis/public/get_news.go +++ b/apis/public/get_news.go @@ -6,6 +6,8 @@ import ( "github.com/XingfenD/rainyun_api_go_sdk/constant" ) +// https://api.rainyun.com/#/paths/news/get + type GetNewsResponse struct { Code int `json:"code"` Data []RainyunNewsItem `json:"data"` diff --git a/apis/public/get_status.go b/apis/public/get_status.go index ccf6ecf..008f300 100644 --- a/apis/public/get_status.go +++ b/apis/public/get_status.go @@ -1,6 +1,15 @@ package public -import "github.com/XingfenD/rainyun_api_go_sdk/constant" +import ( + "github.com/XingfenD/rainyun_api_go_sdk/apis/common" + "github.com/XingfenD/rainyun_api_go_sdk/constant" +) + +// https://api.rainyun.com/#/paths/status/get + +type GetStatusRequest struct { + Options common.StandQueryParameters `json:"options"` +} type GetStatusResponse struct { Code int `json:"code"` @@ -25,6 +34,7 @@ type NodeStatusRecordItem struct { Data string `json:"Data"` } +// TODO func (s *PublicService) GetStatus() (*GetStatusResponse, error) { path := "/status"