mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Add options API #15
This commit is contained in:
@@ -169,6 +169,8 @@ paths:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Spot'
|
||||
|
||||
|
||||
/status:
|
||||
get:
|
||||
tags:
|
||||
@@ -228,6 +230,58 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/ProviderStatus'
|
||||
|
||||
|
||||
/options:
|
||||
get:
|
||||
tags:
|
||||
- spots
|
||||
summary: Retieve a list of options for various enumerations.
|
||||
description: Retrieves the list of options for various enumerated types, which can be found in the spots and also provided back to the API as query parameters. While these enumerated options are defined in this spec anyway, providing them in an API call allows us to define extra parameters, like the colours associated with bands, and also allows clients to set up their filters and features without having to have internal knowledge about, for example, what bands the server knows about.
|
||||
operationId: options
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved options.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
bands:
|
||||
type: array
|
||||
description: An array of all the supported bands.
|
||||
items:
|
||||
$ref: '#/components/schemas/Band'
|
||||
modes:
|
||||
type: array
|
||||
description: An array of all the supported modes.
|
||||
items:
|
||||
type: string
|
||||
example: "LSB"
|
||||
mode_types:
|
||||
type: array
|
||||
description: An array of all the supported mode types.
|
||||
items:
|
||||
type: string
|
||||
example: "PHONE"
|
||||
sigs:
|
||||
type: array
|
||||
description: An array of all the supported Special Interest Groups.
|
||||
items:
|
||||
type: string
|
||||
example: "POTA"
|
||||
sources:
|
||||
type: array
|
||||
description: An array of all the supported data sources (providers).
|
||||
items:
|
||||
type: string
|
||||
example: "Cluster"
|
||||
continents:
|
||||
type: array
|
||||
description: An array of all the supported continents.
|
||||
items:
|
||||
type: string
|
||||
example: "EU"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Spot:
|
||||
@@ -486,4 +540,28 @@ components:
|
||||
last_spot:
|
||||
type: string
|
||||
description: The time of the latest spot received by this provider.
|
||||
example: 2025-09-28T20:31:00+00:00
|
||||
example: 2025-09-28T20:31:00+00:00
|
||||
|
||||
Band:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the band
|
||||
example: 40m
|
||||
start_freq:
|
||||
type: int
|
||||
description: The start frequency of this band, in kHz.
|
||||
example: 7000
|
||||
end_freq:
|
||||
type: int
|
||||
description: The end frequency of this band, in kHz.
|
||||
example: 7200
|
||||
color:
|
||||
type: string
|
||||
description: The color associated with this mode, as used on PSK Reporter.
|
||||
example: "#5959ff"
|
||||
contrast_color:
|
||||
type: string
|
||||
description: Black or white, whichever provides the best contrast against the band colour.
|
||||
example: white
|
||||
Reference in New Issue
Block a user