mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
swagger
This commit is contained in:
@@ -78,7 +78,7 @@ func ScrapePlayerShotChart(db *gorm.DB) fiber.Handler {
|
||||
// @Param season query int false "Season (e.g., 2023)"
|
||||
// @Success 200 {array} models.PlayerShotChart
|
||||
// @Failure 500 {object} map[string]string
|
||||
// @Router /api/playershotchart [get]
|
||||
// //@Router /api/playershotchart [get]
|
||||
func GetPlayerShotChart(db *gorm.DB) fiber.Handler {
|
||||
return func(c *fiber.Ctx) error {
|
||||
var shots []models.PlayerShotChart
|
||||
|
||||
@@ -101,55 +101,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/playershotchart": {
|
||||
"get": {
|
||||
"description": "Returns shot-chart points, optionally filtered by playerId and/or season",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"PlayerShotChart"
|
||||
],
|
||||
"summary": "Get shot-chart data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Player ID (e.g., hardeja01)",
|
||||
"name": "playerId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Season (e.g., 2023)",
|
||||
"name": "season",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.PlayerShotChart"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/playertotals": {
|
||||
"get": {
|
||||
"description": "Filter and paginate player totals",
|
||||
|
||||
@@ -98,55 +98,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/playershotchart": {
|
||||
"get": {
|
||||
"description": "Returns shot-chart points, optionally filtered by playerId and/or season",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"PlayerShotChart"
|
||||
],
|
||||
"summary": "Get shot-chart data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Player ID (e.g., hardeja01)",
|
||||
"name": "playerId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Season (e.g., 2023)",
|
||||
"name": "season",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.PlayerShotChart"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/playertotals": {
|
||||
"get": {
|
||||
"description": "Filter and paginate player totals",
|
||||
|
||||
@@ -185,39 +185,6 @@ paths:
|
||||
summary: Get player advanced stats
|
||||
tags:
|
||||
- PlayerStats
|
||||
/api/playershotchart:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns shot-chart points, optionally filtered by playerId and/or
|
||||
season
|
||||
parameters:
|
||||
- description: Player ID (e.g., hardeja01)
|
||||
in: query
|
||||
name: playerId
|
||||
type: string
|
||||
- description: Season (e.g., 2023)
|
||||
in: query
|
||||
name: season
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.PlayerShotChart'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Get shot-chart data
|
||||
tags:
|
||||
- PlayerShotChart
|
||||
/api/playertotals:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user