平台 API
1. "获取所有可用的第三方平台列表"
- route definition
- Url: /api/v1/platforms
- Method: GET
- Request:
- - Response:
ListPlatformsResponse
request definition
response definition
type ListPlatformsResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Platforms []PlatformInfo `json:"platforms,omitempty"`
}
2. "获取指定平台支持的方法列表"
- route definition
- Url: /api/v1/platforms/:platform/methods
- Method: GET
- Request:
- - Response:
ListPlatformMethodsResponse
request definition
response definition
type ListPlatformMethodsResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Methods []string `json:"methods,omitempty"`
}
3. "调用第三方平台 API"
- route definition
- Url: /api/v1/platforms/call
- Method: POST
- Request:
CallPlatformRequest - Response:
CallPlatformResponse
- request definition
type CallPlatformRequest struct {
Platform string `json:"platform"` // 平台名称,如 "quicksdk"
Method string `json:"method"` // API 方法名
Request string `json:"request"` // 请求参数(JSON 字符串格式)
}
- response definition
type CallPlatformResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Response interface{} `json:"response,omitempty"` // 平台返回的响应
}
