added count option and sorting for artists
This commit is contained in:
@@ -143,6 +143,18 @@ same filters except `upcoming` (it's always `false`).
|
||||
| `date` | string | Exact match on the raw `event_date` string (`dd.mm.yy`) |
|
||||
| `upcoming` | bool | `true` = event date is today or later, `false` = past events (events with an unparseable date are excluded) |
|
||||
| `sort` | string | `asc`/`desc` = chronological by `event_date` (events with an unparseable date always sort last, regardless of direction); `az`/`za` = alphabetical by `event_name` (case-insensitive) |
|
||||
| `count` | int ≥ 1 | Limit the number of results returned, applied after filtering and sorting |
|
||||
|
||||
### `/artists` query parameters
|
||||
|
||||
| Param | Type | Meaning |
|
||||
|-------|------|---------|
|
||||
| `sort` | string | `az`/`za` = alphabetical by artist name (case-insensitive, default `az`); `asc`/`desc` = chronological by each artist's *latest* date (artists with no parseable date always sort last, regardless of direction) |
|
||||
| `count` | int ≥ 1 | Limit the number of artists returned |
|
||||
|
||||
An artist's own `dates` list is always chronological (earliest first) —
|
||||
`sort` only controls the order artists appear in, not the order of dates
|
||||
within one artist.
|
||||
|
||||
### Response shapes
|
||||
|
||||
@@ -250,6 +262,9 @@ curl 'https://fundi.api.example.com/events?date=05.09.26'
|
||||
# Soonest events first
|
||||
curl 'https://fundi.api.example.com/events?sort=asc'
|
||||
|
||||
# Next 5 upcoming events
|
||||
curl 'https://fundi.api.example.com/events?upcoming=true&sort=asc&count=5'
|
||||
|
||||
# Past events (archive)
|
||||
curl https://fundi.api.example.com/events/archive
|
||||
|
||||
@@ -259,6 +274,9 @@ curl https://fundi.api.example.com/events/0
|
||||
# All known artists
|
||||
curl https://fundi.api.example.com/artists
|
||||
|
||||
# 10 most recently active artists
|
||||
curl 'https://fundi.api.example.com/artists?sort=desc&count=10'
|
||||
|
||||
# Calendar feed
|
||||
curl https://fundi.api.example.com/calendar.ics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user