MahjongRank
    MahjongRank
    • Player Register
      POST
    • MatchRecord Import
      POST
    • Player Get
      GET
    • MatchRecord Get
      GET
    • Admin Login
      POST

      MatchRecord Import

      开发中
      POST
      /api/v1/match-records

      请求参数

      Body 参数application/json
      created_at
      string 
      必需
      match_type
      enum<string> 
      必需
      枚举值:
      eastsouth
      record_1
      object (SubMatchRecordInput) 
      必需
      player_name
      string 
      必需
      points
      integer 
      必需
      start_direction
      enum<string> 
      必需
      枚举值:
      eastsouthwestnorth
      record_2
      object (SubMatchRecordInput) 
      必需
      record_3
      object (SubMatchRecordInput) 
      必需
      record_4
      object (SubMatchRecordInput) 
      必需
      示例
      {
          "created_at": "string",
          "match_type": "east",
          "record_1": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          },
          "record_2": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          },
          "record_3": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          },
          "record_4": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          }
      }

      示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST '/api/v1/match-records' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "created_at": "string",
          "match_type": "east",
          "record_1": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          },
          "record_2": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          },
          "record_3": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          },
          "record_4": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east"
          }
      }'

      返回响应

      🟢200成功
      application/json
      Body
      created_at
      string 
      必需
      record_1
      object (SubMatchRecord) 
      必需
      player_name
      string 
      必需
      points
      integer 
      必需
      start_direction
      enum<string> 
      必需
      枚举值:
      eastsouthwestnorth
      rank
      enum<string> 
      必需
      枚举值:
      novice_1novice_2novice_3practitioner_1practitioner_2practitioner_3elite_1elite_2elite_3expert_1expert_2expert_3sage_1sage_2sage_3
      pt
      integer 
      必需
      record_2
      object (SubMatchRecord) 
      必需
      record_3
      object (SubMatchRecord) 
      必需
      record_4
      object (SubMatchRecord) 
      必需
      match_type
      enum<string> 
      必需
      枚举值:
      eastsouth
      示例
      {
          "created_at": "string",
          "record_1": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east",
              "rank": "novice_1",
              "pt": 0
          },
          "record_2": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east",
              "rank": "novice_1",
              "pt": 0
          },
          "record_3": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east",
              "rank": "novice_1",
              "pt": 0
          },
          "record_4": {
              "player_name": "string",
              "points": 0,
              "start_direction": "east",
              "rank": "novice_1",
              "pt": 0
          },
          "match_type": "east"
      }
      🔴500服务器错误
      🟠404记录不存在
      🟠400请求有误
      修改于 2025-06-29 04:28:39
      上一页
      Player Register
      下一页
      Player Get
      Built with