mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-29 02:32:05 +00:00
Multi select upstream providers to send spots to #95
This commit is contained in:
+23
-21
@@ -23,6 +23,7 @@ info:
|
||||
* **Breaking change:** POST `/spot` now expects `activities` (a list) and `activity_refs` in the `spot` object, rather than `sig` and `sig_refs`.
|
||||
* **Breaking change:** In the `/options` response, `sigs` has been renamed to `activities`, and within each activity, `sig_type` has been renamed to `activity_type`.
|
||||
* **Breaking change:** In the `/status` response, `sig_ref_data_providers` has been renamed to `activity_ref_data_providers`, and within each provider, `sig_name` has been renamed to `activity_name`.
|
||||
* **Breaking change:** In the POST `/spot` `handling` object, `submit_upstream` and `upstream_provider` have been replaced by `upstream_providers`, a list of provider names, so a spot can be sent to multiple upstream providers at once. `upstream_credentials` is now a map of provider name to that provider's credentials.
|
||||
|
||||
#### Upgrading a client from v2 to v3 API endpoints
|
||||
|
||||
@@ -940,6 +941,7 @@ components:
|
||||
- BIWOTA
|
||||
- COTA
|
||||
- PGA
|
||||
- Railways
|
||||
- Toilets
|
||||
example: POTA
|
||||
|
||||
@@ -1381,30 +1383,30 @@ components:
|
||||
description: >
|
||||
Optional server-side instructions for how to process this spot submission.
|
||||
properties:
|
||||
submit_upstream:
|
||||
type: boolean
|
||||
upstream_providers:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >
|
||||
If true, forward the spot to an external upstream provider (e.g. POTA, SOTA) rather than only adding it
|
||||
to this Spothole server. Requires `upstream_provider` to be set. Check `spot_submit_providers` in the
|
||||
`/options` response to see which activities and providers support this.
|
||||
default: false
|
||||
upstream_provider:
|
||||
type: string
|
||||
description: >
|
||||
Name of the upstream provider to submit the spot to, e.g. "POTA" or "SOTA". Must
|
||||
match one of the provider names returned in `spot_submit_providers` for the chosen activity.
|
||||
example: POTA
|
||||
Names of upstream providers to forward the spot to (e.g. "POTA", "SOTA"), in addition to or instead
|
||||
of only adding it to this Spothole server. Each name must match one of the provider names returned in
|
||||
`spot_submit_providers` in the `/options` response for the chosen activity. Omit or leave empty to
|
||||
add the spot to this Spothole server only.
|
||||
example: [ POTA, ParksNPeaks ]
|
||||
upstream_credentials:
|
||||
type: object
|
||||
description: >
|
||||
Provider-specific credentials required to authenticate the upstream submission.
|
||||
The required keys depend on the provider. Credentials are used only for the upstream
|
||||
call and are never stored by Spothole.
|
||||
A map of provider name to the provider-specific credentials required to authenticate the upstream
|
||||
submission to that provider. The required keys depend on the provider. Credentials are used only for
|
||||
the upstream call and are never stored by Spothole.
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
example:
|
||||
user_id: "12345"
|
||||
api_key: "abc123"
|
||||
ParksNPeaks:
|
||||
user_id: "12345"
|
||||
api_key: "abc123"
|
||||
captcha_token:
|
||||
type: string
|
||||
description: >
|
||||
@@ -2294,9 +2296,9 @@ components:
|
||||
type: object
|
||||
description: >
|
||||
A map of activity name to a list of provider names that support upstream spot submission for that
|
||||
activity. If an activity appears as a key here, the POST /spot endpoint accepts `submit_upstream: true`
|
||||
for spots with that activity, and will forward the spot to one of the listed providers. Omitted if no
|
||||
providers support upstream submission.
|
||||
activity. If an activity appears as a key here, the POST /spot endpoint accepts these provider names in
|
||||
`upstream_providers` for spots with that activity, and will forward the spot to any of the listed
|
||||
providers. Omitted if no providers support upstream submission.
|
||||
additionalProperties:
|
||||
type: array
|
||||
items:
|
||||
|
||||
Reference in New Issue
Block a user