mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 22:15:13 +00:00
@@ -78,7 +78,7 @@ func ScrapePlayerShotChart(db *gorm.DB) fiber.Handler {
|
|||||||
// @Param season query int false "Season (e.g., 2023)"
|
// @Param season query int false "Season (e.g., 2023)"
|
||||||
// @Success 200 {array} models.PlayerShotChart
|
// @Success 200 {array} models.PlayerShotChart
|
||||||
// @Failure 500 {object} map[string]string
|
// @Failure 500 {object} map[string]string
|
||||||
// @Router /api/playershotchart [get]
|
// //@Router /api/playershotchart [get]
|
||||||
func GetPlayerShotChart(db *gorm.DB) fiber.Handler {
|
func GetPlayerShotChart(db *gorm.DB) fiber.Handler {
|
||||||
return func(c *fiber.Ctx) error {
|
return func(c *fiber.Ctx) error {
|
||||||
var shots []models.PlayerShotChart
|
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": {
|
"/api/playertotals": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Filter and paginate player totals",
|
"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": {
|
"/api/playertotals": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Filter and paginate player totals",
|
"description": "Filter and paginate player totals",
|
||||||
|
|||||||
@@ -185,39 +185,6 @@ paths:
|
|||||||
summary: Get player advanced stats
|
summary: Get player advanced stats
|
||||||
tags:
|
tags:
|
||||||
- PlayerStats
|
- 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:
|
/api/playertotals:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user