hk-service/doc/api.api
2025-02-20 17:32:53 +08:00

104 lines
3.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "v1"
info (
title: "type title here"
desc: "type desc here"
author: "DevTTL"
email: "admin@devttl.com"
version: "v0.1"
)
type Order172 {
OrderNo string `json:"OrderNo"` // Y 合作方订单号
OrderNo172 string `json:"OrderNo172"` // Y 172平台订单号请求头sign里加密的是这个号码。
OrderStatus string `json:"OrderStatus"` // Y 订单状态:已发货,已完成,审核不通过,已取消,已撤单
ThirdPhone string `json:"ThirdPhone"` // N 办理号码
ExpressName string `json:"ExpressName"` // N 物流公司
ExpressCode string `json:"ExpressCode"` // N 物流单号
CardStatus string `json:"CardStatus"` // N 激活状态已激活未激活可能为Null
ActiveTime string `json:"ActiveTime"` // N 激活时间格式yyyy-MM-dd HH:mm:ss可能为Null
Remark string `json:"Remark"` // N 备注失败原因
}
type PushReq {
RequidId string `json:"RequidId"` // Y 推送请求唯一ID
Data Order172 `json:"Data"` // Y 返回订单信息
}
type Push172Resp {
Code int64 `json:"code",options=-1|0` // Y 响应码 -1错误 0正常
Msg string `json:"message"` // Y 错误信息
}
type GoodsItem {
Id int64 `json:"id"` // Y 商品ID
Name string `json:"name"` // Y 商品信息
MainPic string `json:"mainPic"` // Y 主图
DisableAge string `json:"disableAge"` // Y 年龄限制
UniFlow string `json:"uniFlow"` // Y 通用流量
DirFlow string `json:"dirFlow"` // Y 定向流量
TalkTime string `json:"talkTime"` // Y 通话时长
Remarks string `json:"remarks"` // Y 备注
}
type (
GoodsListReq {
Type string `json:"type":"type,default=0"` // Y 运营商 0全部 1电信 2联通 3移动 4光电
}
GoodsListResp {
Data []GoodsItem `json:"data"`
}
)
type (
GoodsDetailsReq {
Id int64 `path:"id"`
}
GoodsDetailsResp {
Data GoodsItem `json:"data"` // Y 商品详情
}
)
type (
TiktokReq {
VideoUrl string `from:"videoUrl"` // 视频地址
}
TiktokResp {
AuthorID string `json:"authorId"` // 作者ID
AuthorUniqueID string `json:"authorUniqueId"` // 作者账号
AuthorAvatar string `json:"authorAvatar"` // 作者头像
AuthorNickname string `json:"authorNickname"` // 作者昵称
VideoID string `json:"videoId"` // 视频ID
VideoTitle string `json:"videoTitle"` // 作品描述
OriginCover string `json:"originCover"` // 静态封面
DynamicCover string `json:"dynamicCover"` // 动态封面
DestinationURL string `json:"destinationUrl"` // 无水印下载地址
WatermarkVideoURL string `json:"watermarkVideoUrl"` // 有水印下载地址
MusicURL string `json:"musicUrl"` // 背景音乐链接
OriginalURL string `json:"originalUrl"` // 原始下载链接
DownloaderURL string `json:"downloaderUrl"` // 解析后下载地址
CreateTime string `json:"createTime"` // 创建时间
Result bool `json:"result"` // 结果
}
)
@server (
group: api
prefix: api
middleware: RealIPMiddleware
)
service api {
@handler tiktokInfo
post /tiktok/getVideoInfo (TiktokReq) returns (TiktokResp)
@handler order172
post /push/order172 (PushReq) returns (Push172Resp)
@handler goodsList
get /goods/list (GoodsListReq) returns (GoodsListResp)
@handler goodsDetails
get /goods/:id (GoodsDetailsReq) returns (GoodsDetailsResp)
}