开放接口
This commit is contained in:
@@ -144,4 +144,37 @@ function buildAgentSign({ method, path, query, body, timestamp, nonce, account,
|
||||
Auth: true,
|
||||
SecurityScheme: openapi.SecuritySchemeAgentOpenAPI,
|
||||
})
|
||||
Register(router, doc, basePath, "GET", "/devices/traffic", handler.GetDeviceTraffic, RouteSpec{
|
||||
Summary: "查询设备套餐内流量",
|
||||
Description: authDescription + "\n\n按 device_no 查询设备套餐内流量、当前套餐和待生效套餐。device_no 支持虚拟号、IMEI。",
|
||||
Input: new(dto.AgentOpenAPIDeviceQueryRequest),
|
||||
Output: new(dto.AgentOpenAPIDeviceTrafficResponse),
|
||||
Tags: []string{tag},
|
||||
Auth: true,
|
||||
SecurityScheme: openapi.SecuritySchemeAgentOpenAPI,
|
||||
})
|
||||
Register(router, doc, basePath, "POST", "/devices/switch-card", handler.SwitchDeviceCard, RouteSpec{
|
||||
Summary: "切网(多卡设备切换 ICCID)",
|
||||
Description: authDescription + "\n\n按 device_no 将多卡设备切换到指定 ICCID 的卡。",
|
||||
Input: new(dto.AgentOpenAPIDeviceSwitchCardRequest),
|
||||
Tags: []string{tag},
|
||||
Auth: true,
|
||||
SecurityScheme: openapi.SecuritySchemeAgentOpenAPI,
|
||||
})
|
||||
Register(router, doc, basePath, "POST", "/devices/reboot", handler.RebootDevice, RouteSpec{
|
||||
Summary: "重启设备",
|
||||
Description: authDescription + "\n\n按 device_no 远程重启设备。",
|
||||
Input: new(dto.AgentOpenAPIDeviceOperationRequest),
|
||||
Tags: []string{tag},
|
||||
Auth: true,
|
||||
SecurityScheme: openapi.SecuritySchemeAgentOpenAPI,
|
||||
})
|
||||
Register(router, doc, basePath, "POST", "/devices/reset", handler.ResetDevice, RouteSpec{
|
||||
Summary: "恢复出厂设置",
|
||||
Description: authDescription + "\n\n按 device_no 远程恢复设备出厂设置。",
|
||||
Input: new(dto.AgentOpenAPIDeviceOperationRequest),
|
||||
Tags: []string{tag},
|
||||
Auth: true,
|
||||
SecurityScheme: openapi.SecuritySchemeAgentOpenAPI,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user