Added Geoip endpoint

This commit is contained in:
jasonlandbridge@protonmail.com
2024-08-21 12:25:41 +02:00
parent a2b683bbfa
commit 764117b88b
3 changed files with 75 additions and 50 deletions

View File

@@ -1,48 +1,48 @@
get:
servers:
- url: https://plex.tv/api/v2
tags:
- Plex
summary: Get Companions Data
description: Get Companions Data
operationId: getCompanionsData
responses:
'200':
description: Companions Data
content:
application/json:
schema:
type: array
items:
type: object
required:
- identifier
- baseURL
- title
- linkURL
- provides
- token
properties:
identifier:
type: string
example: tv.plex.sonos
baseURL:
type: string
example: 'https://sonos.plex.tv'
format: uri
title:
type: string
example: Sonos
linkURL:
type: string
example: 'https://sonos.plex.tv/link'
provides:
type: string
example: 'client,player'
token:
type: string
description: The plex authtoken used to identify with
'400':
$ref: '../../responses/400.yaml'
'401':
$ref: '../../responses/401.yaml'
get:
servers:
- url: 'https://plex.tv/api/v2'
tags:
- Plex
summary: Get Companions Data
description: Get Companions Data
operationId: getCompanionsData
responses:
'200':
description: Companions Data
content:
application/json:
schema:
type: array
items:
type: object
required:
- identifier
- baseURL
- title
- linkURL
- provides
- token
properties:
identifier:
type: string
example: tv.plex.sonos
baseURL:
type: string
example: 'https://sonos.plex.tv'
format: uri
title:
type: string
example: Sonos
linkURL:
type: string
example: 'https://sonos.plex.tv/link'
provides:
type: string
example: 'client,player'
token:
type: string
description: The plex authtoken used to identify with
'400':
$ref: ../../responses/400.yaml
'401':
$ref: ../../responses/401.yaml

20
paths/geoip/geoip.yaml Normal file
View File

@@ -0,0 +1,20 @@
get:
servers:
- url: 'https://plex.tv/api/v2'
security: [] # No security required
tags:
- Plex
summary: Get Geo Data
description: Returns the geolocation and locale data of the caller
operationId: getGeoData
responses:
'200':
description: Gets the geo location data of the user
content:
application/json:
schema:
$ref: ./models/GeoData.yaml
'400':
$ref: ../../responses/400.yaml
'401':
$ref: ../../responses/401.yaml

View File

@@ -78,11 +78,16 @@ paths:
/devices:
$ref: "./paths/devices.yaml"
#Companions
# Companions
# Folder pms/paths/companions
/companions:
$ref: "paths/companions/companions.yaml"
# GeoIP
# Folder pms/paths/geoip
/geoip:
$ref: "paths/geoip/geoip.yaml"
# Plex Home
# Folder: pms/paths/home
/home: