@ -10,52 +10,22 @@ A listing provider should be available via Session's onion request to provide an
## Approaches to extending the SOGS API
Given that the listing provider API may be ahead in development of the SOGS API and conflicts between data keys can arise, there are several approaches to consider. To ensure consistency, the chosen approach should be considered binding to all endpoints of the protocol including information fetched from mixed sources.
Given that the listing provider API development is independent of the SOGS API and conflicts between data keys can arise, there are several approaches to consider. To ensure consistency, the approach to **wrap all potentially conflicting data keys** should be considered binding to all endpoints if they combine data from independent sources (independent in specification).
```json5
// Note: Key names subject to change.
// Side-by-side (Potentially collision-prone):
{
"name": "Community Name",
"description": "Lorem ipsum dolor sit amet",
"tags": ["maintainer-tag"],
"nsfw": false
}
// Wrap SOGS API-provided info:
{
"api": {
"name": "Community Name",
"description": "Lorem ipsum dolor sit amet",
},
"tags": ["maintainer-tag"],
"nsfw": false
}
// Wrap maintainer-provided info:
{
"name": "Community Name",
"description": "Lorem ipsum dolor sit amet",
"extras": {
"tags": ["maintainer-tag"],
"nsfw": false
}
}
// Wrap both:
{
"api": {
"room": {
"name": "Community Name",
"description": "Lorem ipsum dolor sit amet"
},
"extras": {
"tags": ["maintainer-tag"],
"nsfw": false
"room_extra": {
"join_url": "...",
"language_flag": "🇬🇧",
"tags": ["maintainer-tag"]
}
}
@ -99,6 +69,10 @@ Error responses:
See <https://github.com/oxen-io/session-pysogs/blob/dev/sogs/routes/onion_request.py#L269>.
### GET `/`
Description: Show a human-readable HTML page describing the service.
### GET `/listings`
Description: Enumerate the listings hosted by the listing provider with listing-specific details.