mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-16 00:53:39 +00:00
Provide an externally usable callsign lookup feature. #73
This commit is contained in:
@@ -488,11 +488,102 @@ paths:
|
||||
example: true
|
||||
|
||||
|
||||
/lookup/call:
|
||||
get:
|
||||
tags:
|
||||
- Utilities
|
||||
summary: Look up callsign details
|
||||
description: Perform a lookup of data about a certain callsign, using any of the lookup services available to the Spothole server.
|
||||
operationId: call
|
||||
parameters:
|
||||
- name: call
|
||||
in: query
|
||||
description: A callsign
|
||||
required: true
|
||||
type: string
|
||||
example: M0TRT
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
call:
|
||||
type: string
|
||||
description: Callsign, as provided to the API
|
||||
example: M0TRT
|
||||
name:
|
||||
type: string
|
||||
description: Name of the operator
|
||||
example: Ian
|
||||
country:
|
||||
type: string
|
||||
description: Country of the operator
|
||||
example: United Kingdom
|
||||
flag:
|
||||
type: string
|
||||
description: Country flag of the operator
|
||||
example: ""
|
||||
continent:
|
||||
type: string
|
||||
description: Continent of the operator
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
example: EU
|
||||
dxcc_id:
|
||||
type: integer
|
||||
description: DXCC ID of the operator
|
||||
example: 235
|
||||
cq_zone:
|
||||
type: integer
|
||||
description: CQ zone of the operator
|
||||
example: 27
|
||||
itu_zone:
|
||||
type: integer
|
||||
description: ITU zone of the operator
|
||||
example: 14
|
||||
grid:
|
||||
type: string
|
||||
description: Maidenhead grid locator for the operator's QTH. This could be from an online lookup service, or just based on the DXCC.
|
||||
example: IO91aa
|
||||
latitude:
|
||||
type: number
|
||||
description: Latitude of the operator's QTH, in degrees. This could be from an online lookup service, or just based on the DXCC.
|
||||
example: 51.2345
|
||||
longitude:
|
||||
type: number
|
||||
description: Longitude of the opertor's QTH, in degrees. This could be from an online lookup service, or just based on the DXCC.
|
||||
example: -1.2345
|
||||
location_source:
|
||||
type: string
|
||||
description: Where we got the location (grid/latitude/longitude) from. Unlike a spot where we might have a summit position or WAB square, here the only options are an online QTH lookup, or a location based purely on DXCC, or nothing.
|
||||
enum:
|
||||
- "HOME QTH"
|
||||
- DXCC
|
||||
- NONE
|
||||
example: "HOME QTH"
|
||||
'422':
|
||||
description: Validation error e.g. callsign missing or format incorrect
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
example: "Failed"
|
||||
|
||||
|
||||
/lookup/sigref:
|
||||
get:
|
||||
tags:
|
||||
- Utilities
|
||||
summary: Look up SIG Ref details
|
||||
summary: Look up SIG ref details
|
||||
description: Perform a lookup of data about a certain reference, providing the SIG and the ID of the reference. A SIGRef structure will be returned containing the SIG and ID, plus any other information Spothole could find about it.
|
||||
operationId: sigref
|
||||
parameters:
|
||||
@@ -709,13 +800,13 @@ components:
|
||||
- SPOT
|
||||
- "SIG REF LOOKUP"
|
||||
- "WAB/WAI GRID"
|
||||
- QRZ
|
||||
- "HOME QTH"
|
||||
- DXCC
|
||||
- NONE
|
||||
example: SPOT
|
||||
dx_location_good:
|
||||
type: boolean
|
||||
description: Does the software think the location is good enough to put a marker on a map? This is true if the source is "SPOT", "SIG REF LOOKUP" or "WAB/WAI GRID", or alternatively if the source is "QRZ" and the callsign doesn't have a slash in it (i.e. operator likely at home).
|
||||
description: Does the software think the location is good enough to put a marker on a map? This is true if the source is "SPOT", "SIG REF LOOKUP" or "WAB/WAI GRID", or alternatively if the source is "HOME QTH" and the callsign doesn't have a slash in it (i.e. operator likely at home).
|
||||
example: true
|
||||
de_call:
|
||||
type: string
|
||||
|
||||
@@ -156,7 +156,7 @@ function updateTable() {
|
||||
var bearing = calcBearing(userPos[0], userPos[1], s["dx_latitude"], s["dx_longitude"]);
|
||||
bearingText = bearing.toFixed(0).padStart(3, '0') + "°";
|
||||
if (s["dx_location_good"] == null || s["dx_location_good"] == false) {
|
||||
if (s["dx_location_source"] == "QRZ") {
|
||||
if (s["dx_location_source"] == "HOME QTH") {
|
||||
bearingText = bearingText + "<span class='bearing-q hideonmobile'><i class='fa-solid fa-circle-question' title='The position was not reported via the spotting service. We had to fall back to a QRZ \"home\" location for a portable/mobile/alternative spot, so this bearing may not be accurate if the DX is close to you..'></i></span>";
|
||||
} else {
|
||||
bearingText = bearingText + "<span class='bearing-q hideonmobile'><i class='fa-solid fa-circle-question' title='The position was not reported via the spotting service. We had to fall back to just using the centre of a DXCC entity, so this bearing may not be accurate if the DX is close to you.'></i></span>";
|
||||
|
||||
Reference in New Issue
Block a user