Fusion
  1. favorite
Fusion
  • user
    • profile
      • 用户档案信息
      • 上传用户档案
    • 用户登录
      POST
    • 用户注册
      POST
    • 用户基本信息
      GET
    • 上传用户基本信息
      POST
  • contest
    • 赛事板块列表
      GET
    • 赛事板块信息
      GET
    • 创建赛事
      POST
  • team
    • 创建队伍
      POST
    • 队伍列表
      GET
    • 队伍信息
      GET
    • 队伍申请
      POST
    • 收到请求列表
      GET
    • 请求管理
      POST
  • favorite
    • 收藏赛事操作
      POST
    • 收藏赛事列表
      GET
  • article
    • 赛事资讯文章列表
      GET
    • 赛事资讯文章信息-后续迭代
      GET
    • 创建文章
      POST
  • utils
    • 图片上传
      POST
  1. favorite

收藏赛事操作

开发中
正式环境
http://101.35.229.143:8888/fusion
正式环境
http://101.35.229.143:8888/fusion
POST
http://101.35.229.143:8888/fusion
/favorite/contest/action
此接口允许用户收藏或取消收藏特定的赛事

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json
user_id
integer 
用户 ID
必需
contest_id
integer 
赛事资讯 ID
必需
action_type
integer 
必需
操作类型,1 表示收藏,2 表示取消收藏。
示例
{
    "user_id": 1,
    "contest_id": 1,
    "action_type": 1
}

示例代码

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://101.35.229.143:8888/fusion/favorite/contest/action' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_id": 1,
    "contest_id": 1,
    "action_type": 1
}'

返回响应

🟢200成功
application/json
Body
status_code
integer 
状态码,0-成功,其他值-失败
必需
status_msg
string  | null 
返回状态描述
必需
示例
{
    "status_code": 0,
    "status_msg": "Success!"
}
修改于 2023-11-17 14:02:52
上一页
请求管理
下一页
收藏赛事列表
Built with