populate both tables in loop

This commit is contained in:
Ravi Prasad
2025-04-30 22:49:38 -05:00
parent 80e4823b35
commit e3c8c76f35
15 changed files with 506 additions and 32 deletions
+80 -1
View File
@@ -15,7 +15,7 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/playerstats": {
"/api/playeradvancedstats": {
"get": {
"description": "Returns filtered and paginated player stats",
"consumes": [
@@ -84,6 +84,85 @@ const docTemplate = `{
}
}
}
},
"/api/playertotals": {
"get": {
"description": "Filter and paginate player totals",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"PlayerTotals"
],
"summary": "Get player total stats",
"parameters": [
{
"type": "integer",
"description": "Season (e.g. 2000)",
"name": "season",
"in": "query"
},
{
"type": "string",
"description": "Team abbreviation (e.g. LAL)",
"name": "team",
"in": "query"
},
{
"type": "string",
"description": "Player ID (e.g. greenac01)",
"name": "playerId",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 20,
"description": "Page size",
"name": "pageSize",
"in": "query"
},
{
"type": "string",
"description": "Field to sort by (e.g. points, assists)",
"name": "sortBy",
"in": "query"
},
{
"type": "boolean",
"description": "Sort ascending (default false)",
"name": "ascending",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
}`