Skip to content

Instantly share code, notes, and snippets.

@bperin
Last active June 12, 2024 23:54
Show Gist options
  • Save bperin/cf6109e6aadd92f7a640a6b491a54297 to your computer and use it in GitHub Desktop.
Save bperin/cf6109e6aadd92f7a640a6b491a54297 to your computer and use it in GitHub Desktop.
openapi: "3.0.0"
info:
version: 1.0.0
title: Ticketmaster Classifications API
description: Fetches classification details from Ticketmaster
servers:
- url: https://app.ticketmaster.com
paths:
/discovery/v2/classifications:
get:
operationId: get_classifications
description: Retrieves classification details from Ticketmaster.
summary: Retrieves classification details from Ticketmaster.
parameters:
- name: apikey
in: query
required: true
description: Your Ticketmaster API key
schema:
type: string
default: "TT3tqYHZry6Gz6zURHEjot4EIv3IlBk6"
- name: page
in: query
required: true
description: Page number for pagination
schema:
type: integer
default: 0
responses:
'200':
description: Returns classification details.
content:
application/json:
schema:
$ref: '#/components/schemas/ClassificationResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'500':
description: Internal Server Error
components:
schemas:
ClassificationResponse:
type: object
properties:
_embedded:
type: object
properties:
classifications:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
segment:
type: object
properties:
id:
type: string
name:
type: string
genre:
type: object
properties:
id:
type: string
name:
type: string
subGenre:
type: object
properties:
id:
type: string
name:
type: string
type:
type: object
properties:
id:
type: string
name:
type: string
subType:
type: object
properties:
id:
type: string
name:
type: string
page:
type: object
properties:
size:
type: integer
totalElements:
type: integer
totalPages:
type: integer
number:
type: integer
openapi: "3.0.0"
info:
version: 1.0.0
title: Ticketmaster Events API
description: Fetches event details from Ticketmaster based on location and other optional parameters
servers:
- url: https://app.ticketmaster.com
paths:
/discovery/v2/events:
get:
operationId: get_events
description: Retrieves event details from Ticketmaster based on location and other optional parameters.
summary: Retrieves event details from Ticketmaster.
parameters:
- name: apikey
in: query
required: true
description: Your Ticketmaster API key
schema:
type: string
default: "TT3tqYHZry6Gz6zURHEjot4EIv3IlBk6"
- name: latlong
in: query
required: true
description: Latitude and longitude of the location
schema:
type: string
example: "37.774929,-122.419418"
- name: page
in: query
required: true
description: Page number for pagination
schema:
type: integer
default: 1
- name: size
in: query
required: true
description: Number of events per page
schema:
type: integer
default: 20
- name: radius
in: query
required: true
description: Radius to search within
schema:
type: integer
default: 50
- name: unit
in: query
required: true
description: Unit of distance (miles or km)
schema:
type: string
default: "miles"
- name: sort
in: query
required: true
description: Sort order of the events
schema:
type: string
default: "distance,asc"
- name: genreId
in: query
required: false
description: Genre ID for filtering events
schema:
type: string
default: "KnvZfZ7vAvF"
- name: subGenreId
in: query
required: false
description: Sub-genre ID for filtering events
schema:
type: string
default: "null"
responses:
'200':
description: Returns event details.
content:
application/json:
schema:
$ref: '#/components/schemas/EventResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'500':
description: Internal Server Error
components:
schemas:
EventResponse:
type: object
properties:
_embedded:
type: object
properties:
events:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
dates:
type: object
properties:
start:
type: object
properties:
localDate:
type: string
localTime:
type: string
classifications:
type: array
items:
type: object
properties:
genre:
type: object
properties:
id:
type: string
name:
type: string
subGenre:
type: object
properties:
id:
type: string
name:
type: string
_links:
type: object
properties:
self:
type: object
properties:
href:
type: string
attractions:
type: array
items:
type: object
properties:
href:
type: string
venues:
type: array
items:
type: object
properties:
href:
type: string
page:
type: object
properties:
size:
type: integer
totalElements:
type: integer
totalPages:
type: integer
number:
type: integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment