Demo:https://chatgpt.com/g/g-prFoRRAei-footyai
Chatgpt yada istediğiniz yere yapıştırın kody
Kod
openapi: 3.1.0
info:
title: Football-Data.org API
version: 2.0.0
description: API for retrieving football match data and related information
servers:
- url: https://api.football-data.org/v2
paths:
/competitions:
get:
summary: Get a list of all available competitions
operationId: getCompetitions
security:
- ApiKeyHeaderAuth: []
responses:
'200':
description: List of competitions
content:
application/json:
schema:
$ref: '#/components/schemas/CompetitionList'
/competitions/{id}:
get:
summary: Get details for a specific competition
operationId: getCompetitionById
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
responses:
'200':
description: Competition details
content:
application/json:
schema:
$ref: '#/components/schemas/Competition'
/competitions/{id}/teams:
get:
summary: Get teams for a specific competition
operationId: getTeamsByCompetition
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
responses:
'200':
description: List of teams
content:
application/json:
schema:
$ref: '#/components/schemas/TeamList'
/competitions/{id}/standings:
get:
summary: Get standings for a specific competition
operationId: getStandingsByCompetition
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
responses:
'200':
description: Standings for the competition
content:
application/json:
schema:
$ref: '#/components/schemas/StandingsList'
/competitions/{id}/matches:
get:
summary: Get matches for a specific competition
operationId: getMatchesByCompetition
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
- name: status
in: query
required: false
schema:
type: string
enum: [SCHEDULED, LIVE, IN_PLAY, PAUSED, FINISHED, POSTPONED, SUSPENDED, CANCELLED]
- name: dateFrom
in: query
required: false
schema:
type: string
format: date
- name: dateTo
in: query
required: false
schema:
type: string
format: date
- name: stage
in: query
required: false
schema:
type: string
- name: season
in: query
required: false
schema:
type: string
pattern: '\d\d\d\d'
responses:
'200':
description: List of matches
content:
application/json:
schema:
$ref: '#/components/schemas/MatchList'
/competitions/{id}/scorers:
get:
summary: Get top scorers for a specific competition
operationId: getScorersByCompetition
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
- name: season
in: query
required: false
schema:
type: string
pattern: '\d\d\d\d'
responses:
'200':
description: List of top scorers
content:
application/json:
schema:
$ref: '#/components/schemas/ScorerList'
/matches:
get:
summary: Get matches with optional filters
operationId: getMatches
security:
- ApiKeyHeaderAuth: []
parameters:
- name: dateFrom
in: query
required: false
schema:
type: string
format: date
- name: dateTo
in: query
required: false
schema:
type: string
format: date
- name: status
in: query
required: false
schema:
type: string
enum: [SCHEDULED, LIVE, IN_PLAY, PAUSED, FINISHED, POSTPONED, SUSPENDED, CANCELLED]
- name: season
in: query
required: false
schema:
type: string
pattern: '\d\d\d\d'
- name: competition
in: query
required: false
schema:
type: integer
responses:
'200':
description: List of matches
content:
application/json:
schema:
$ref: '#/components/schemas/MatchList'
/matches/{id}:
get:
summary: Get details for a specific match
operationId: getMatchById
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
responses:
'200':
description: Match details
content:
application/json:
schema:
$ref: '#/components/schemas/Match'
/teams/{id}:
get:
summary: Get details for a specific team
operationId: getTeamById
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
responses:
'200':
description: Team details
content:
application/json:
schema:
$ref: '#/components/schemas/Team'
/teams/{id}/matches:
get:
summary: Get matches for a specific team
operationId: getMatchesByTeam
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
- name: status
in: query
required: false
schema:
type: string
enum: [SCHEDULED, LIVE, IN_PLAY, PAUSED, FINISHED, POSTPONED, SUSPENDED, CANCELLED]
- name: dateFrom
in: query
required: false
schema:
type: string
format: date
- name: dateTo
in: query
required: false
schema:
type: string
format: date
- name: season
in: query
required: false
schema:
type: string
pattern: '\d\d\d\d'
responses:
'200':
description: List of matches for the team
content:
application/json:
schema:
$ref: '#/components/schemas/MatchList'
/players/{id}:
get:
summary: Get details for a specific player
operationId: getPlayerById
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
responses:
'200':
description: Player details
content:
application/json:
schema:
$ref: '#/components/schemas/Player'
/players/{id}/matches:
get:
summary: Get matches for a specific player
operationId: getMatchesByPlayer
security:
- ApiKeyHeaderAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
pattern: '[0-9]+'
responses:
'200':
description: List of matches for the player
content:
application/json:
schema:
$ref: '#/components/schemas/MatchList'
components:
securitySchemes:
ApiKeyHeaderAuth:
type: apiKey
in: header
name: X-Auth-Token
schemas:
CompetitionList:
type: object
properties:
count:
type: integer
competitions:
type: array
items:
$ref: '#/components/schemas/Competition'
Competition:
type: object
properties:
id:
type: integer
area:
$ref: '#/components/schemas/Area'
name:
type: string
code:
type: string
nullable: true
plan:
type: string
enum: [TIER_ONE, TIER_TWO, TIER_THREE]
currentSeason:
$ref: '#/components/schemas/Season'
seasons:
type: array
items:
$ref: '#/components/schemas/Season'
lastUpdated:
type: string
format: date-time
MatchList:
type: object
properties:
count:
type: integer
matches:
type: array
items:
$ref: '#/components/schemas/Match'
Match:
type: object
properties:
id:
type: integer
competition:
$ref: '#/components/schemas/Competition'
season:
$ref: '#/components/schemas/Season'
utcDate:
type: string
format: date-time
status:
type: string
enum: [SCHEDULED, LIVE, IN_PLAY, PAUSED, FINISHED, POSTPONED, SUSPENDED, CANCELLED]
minute:
type: integer
nullable: true
attendance:
type: integer
nullable: true
venue:
type: string
nullable: true
matchday:
type: integer
nullable: true
stage:
type: string
group:
type: string
nullable: true
lastUpdated:
type: string
format: date-time
homeTeam:
$ref: '#/components/schemas/Team'
awayTeam:
$ref: '#/components/schemas/Team'
score:
$ref: '#/components/schemas/MatchScore'
goals:
type: array
items:
$ref: '#/components/schemas/Goal'
bookings:
type: array
items:
$ref: '#/components/schemas/Booking'
substitutions:
type: array
items:
$ref: '#/components/schemas/Substitution'
referees:
type: array
items:
$ref: '#/components/schemas/Referee'
head2head:
$ref: '#/components/schemas/HeadToHead'
TeamList:
type: object
properties:
count:
type: integer
teams:
type: array
items:
$ref: '#/components/schemas/Team'
Team:
type: object
properties:
id:
type: integer
area:
$ref: '#/components/schemas/Area'
name:
type: string
shortName:
type: string
tla:
type: string
address:
type: string
nullable: true
phone:
type: string
nullable: true
website:
type: string
nullable: true
email:
type: string
nullable: true
founded:
type: integer
nullable: true
clubColors:
type: string
nullable: true
venue:
type: string
nullable: true
squad:
type: array
items:
$ref: '#/components/schemas/Player'
lastUpdated:
type: string
format: date-time
Player:
type: object
properties:
id:
type: integer
name:
type: string
firstName:
type: string
lastName:
type: string
dateOfBirth:
type: string
format: date
countryOfBirth:
type: string
nationality:
type: string
position:
type: string
lastUpdated:
type: string
format: date-time
StandingsList:
type: object
properties:
season:
$ref: '#/components/schemas/Season'
filters:
type: object
standings:
type: array
items:
$ref: '#/components/schemas/StandingsTable'
StandingsTable:
type: object
properties:
stage:
type: string
type:
type: string
group:
type: string
nullable: true
table:
type: array
items:
$ref: '#/components/schemas/StandingsRow'
StandingsRow:
type: object
properties:
position:
type: integer
team:
$ref: '#/components/schemas/Team'
playedGames:
type: integer
won:
type: integer
draw:
type: integer
lost:
type: integer
points:
type: integer
goalsFor:
type: integer
goalsAgainst:
type: integer
goalDifference:
type: integer
ScorerList:
type: object
properties:
count:
type: integer
scorers:
type: array
items:
$ref: '#/components/schemas/Scorer'
Scorer:
type: object
properties:
player:
$ref: '#/components/schemas/Player'
position:
type: string
numberOfGoals:
type: integer
Season:
type: object
properties:
id:
type: integer
startDate:
type: string
format: date
endDate:
type: string
format: date
currentMatchday:
type: integer
availableStages:
type: array
items:
type: string
Area:
type: object
properties:
id:
type: integer
name:
type: string
MatchScore:
type: object
properties:
winner:
type: string
enum: [HOME_TEAM, AWAY_TEAM, DRAW]
duration:
type: string
fullTime:
type: object
properties:
homeTeam:
type: integer
awayTeam:
type: integer
halfTime:
type: object
properties:
homeTeam:
type: integer
awayTeam:
type: integer
extraTime:
type: object
properties:
homeTeam:
type: integer
nullable: true
awayTeam:
type: integer
nullable: true
penalties:
type: object
properties:
homeTeam:
type: integer
nullable: true
awayTeam:
type: integer
nullable: true
Goal:
type: object
properties:
minute:
type: integer
extraTime:
type: integer
nullable: true
type:
type: string
team:
$ref: '#/components/schemas/Team'
scorer:
$ref: '#/components/schemas/Player'
assist:
$ref: '#/components/schemas/Player'
nullable: true
Booking:
type: object
properties:
minute:
type: integer
team:
$ref: '#/components/schemas/Team'
player:
$ref: '#/components/schemas/Player'
card:
type: string
enum: [YELLOW_CARD, RED_CARD]
Substitution:
type: object
properties:
minute:
type: integer
team:
$ref: '#/components/schemas/Team'
playerOut:
$ref: '#/components/schemas/Player'
playerIn:
$ref: '#/components/schemas/Player'
Referee:
type: object
properties:
id:
type: integer
name:
type: string
nationality:
type: string
nullable: true
HeadToHead:
type: object
properties:
numberOfMatches:
type: integer
totalGoals:
type: integer
homeTeam:
type: object
properties:
wins:
type: integer
draws:
type: integer
losses:
type: integer
awayTeam:
type: object
properties:
wins:
type: integer
draws:
type: integer
losses:
type: integer
