AltitudeWeb/open_api/src/main/resources/api.yml

106 lines
2.6 KiB
YAML
Raw Normal View History

2025-04-02 17:18:39 +00:00
openapi: 3.0.4
info:
title: Altitude Web API
description: |-
The API for the Altitude website
version: 1.0.0
servers:
- url: https://alttd.com/api/v3
tags:
- name: player
description: Retrieve player information
paths:
/player/teamMembers/{group}:
get:
tags:
- team
summary: Get team members
description: Retrieve players who are part of the specified team
operationId: getTeamMembers
parameters:
- name: group
in: path
required: true
description: The group name of the team
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/TeamMembers'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
2025-04-02 17:18:39 +00:00
/player/history:
post:
tags:
- user
summary: Get player history
description: Retrieves all types of player history about the player
operationId: getPlayerHistory
requestBody:
description: The player history
content:
application/json:
schema:
$ref: '#/components/schemas/Player'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PlayerHistory'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
schemas:
PlayerHistory:
type: object
properties:
punishmentType:
type: string
punishment:
type: string
active:
type: boolean
start:
type: integer
format: int64
duration:
type: integer
format: int64
TeamMembers:
type: array
items:
$ref: '#/components/schemas/Player'
Player:
type: object
properties:
name:
type: string
description: The name of the player
example: a_name
uuid:
type: string
example: 0c35e520-927e-4c6a-87ad-ff0739c22e9d
description: The uuid of the team player
required:
- name
- uuid
2025-04-02 17:18:39 +00:00
Error:
type: object
properties:
reason:
type: string