Deploy Bots API #28

Merged
Quaternions merged 34 commits from staging into master 2026-02-28 02:33:43 +00:00
4 changed files with 122 additions and 1 deletions
Showing only changes of commit 010494ed0e - Show all commits

View File

@@ -409,6 +409,52 @@ const docTemplate = `{
}
},
"/time/{id}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get a specific time by its ID",
"produces": [
"application/json"
],
"tags": [
"times"
],
"summary": "Get time by ID",
"parameters": [
{
"type": "integer",
"description": "Time ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Response-Time"
}
},
"404": {
"description": "Time not found",
"schema": {
"$ref": "#/definitions/Error"
}
},
"default": {
"description": "General error response",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/time/{id}/download-url": {
"get": {
"security": [
{

View File

@@ -402,6 +402,52 @@
}
},
"/time/{id}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get a specific time by its ID",
"produces": [
"application/json"
],
"tags": [
"times"
],
"summary": "Get time by ID",
"parameters": [
{
"type": "integer",
"description": "Time ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Response-Time"
}
},
"404": {
"description": "Time not found",
"schema": {
"$ref": "#/definitions/Error"
}
},
"default": {
"description": "General error response",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/time/{id}/download-url": {
"get": {
"security": [
{

View File

@@ -390,6 +390,35 @@ paths:
tags:
- times
/time/{id}:
get:
description: Get a specific time by its ID
parameters:
- description: Time ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Response-Time'
"404":
description: Time not found
schema:
$ref: '#/definitions/Error'
default:
description: General error response
schema:
$ref: '#/definitions/Error'
security:
- ApiKeyAuth: []
summary: Get time by ID
tags:
- times
/time/{id}/download-url:
get:
description: Get a download url for the bot replay of a time by its ID if it
exists

View File

@@ -336,7 +336,7 @@ func (h *TimesHandler) GetPlacements(ctx *gin.Context) {
// @Failure 404 {object} dto.Error "Time does not have a Bot"
// @Failure 404 {object} dto.Error "Bot not found"
// @Failure default {object} dto.Error "General error response"
// @Router /time/{id} [get]
// @Router /time/{id}/download-url [get]
func (h *TimesHandler) GetDownloadUrl(ctx *gin.Context) {
// Extract time ID from path parameter
id := ctx.Param("id")