tiktok-240113
  1. 视频
tiktok-240113
  • 文档
    • README.md
  • 用户
    • 注册
      POST
    • 登录
      POST
    • 用户信息
      GET
    • 上传头像
      PUT
    • 获取 MFA qrcode
      GET
    • 绑定多因素身份认证(MFA)
      POST
    • 以图搜图
      POST
  • 视频
    • 视频流
      GET
    • 投稿
      POST
    • 发布列表
      GET
    • 热门排行榜
      GET
    • 搜索视频
      POST
  • 互动
    • 点赞操作
      POST
    • 点赞列表
      GET
    • 评论
      POST
    • 评论列表
      GET
    • 删除评论
      DELETE
  • 社交
    • 聊天
    • 关注操作
      POST
    • 关注列表
      GET
    • 粉丝列表
      GET
    • 好友列表
      GET
  1. 视频

搜索视频

开发环境
http://localhost:10001
开发环境
http://localhost:10001
POST
/video/search
搜索指定关键字的视频,将会从以下字段进行搜索
标题(title)
描述(description)

请求参数

Header 参数
Access-Token
string 
可选
Refresh-Token
string 
可选
Body 参数multipart/form-data
keywords
string 
必需
可空,关键字,留空默认不做关键字要求
page_size
integer 
页面尺寸
必需
page_num
integer 
页码
必需
from_date
integer 
可选
可空,起始时间,13 位 timestamp
to_date
integer 
可选
可空,结束时间,13 位 timestamp
username
string 
可选
可空,查询包含指定字符的用户发布的视频

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:10001/video/search' \
--header 'Access-Token;' \
--header 'Refresh-Token;' \
--form 'keywords=""' \
--form 'page_size=""' \
--form 'page_num=""' \
--form 'from_date=""' \
--form 'to_date=""' \
--form 'username=""'

返回响应

🟢200成功
application/json
Body
base
object (响应状态) 
必需
code
integer 
必需
msg
string 
必需
data
object 
必需
items
array[object (视频) {12}] 
必需
total
integer 
查询的全部结果数量
必需
示例
{
    "base": {
        "code": 10000,
        "msg": "success"
    },
    "data": {
        "items": [
            {
                "id": "483675103821824000",
                "user_id": "483675103821824000",
                "video_url": "https://west2.online/video-example.mp4",
                "cover_url": "https://west2.online/video-example.jpeg",
                "title": "west2-online",
                "description": "west2-online",
                "visit_count": 0,
                "like_count": 0,
                "comment_count": 0,
                "created_at": "1970-01-01 08:00:00",
                "updated_at": "1970-01-01 08:00:00",
                "deleted_at": "1970-01-01 08:00:00"
            }
        ],
        "total": 100
    }
}
🟢200失败
上一页
热门排行榜
下一页
点赞操作
Built with