Documentation · API reference
GET
/api/v1/sites/{site}/pickThe picker
This page as Markdown, or in an AI chatMore ways to read this page
The picker: a stored copy of a page with everything on it that can be picked, and what the selected thing's selector matches.
# The picker
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/get-sites-site-pick
`GET /api/v1/sites/{site}/pick`
The picker: a stored copy of a page with everything on it that can be picked, and what the selected thing's selector matches.
## Parameters
- `site` (in path, needed): A site's id or name
- `path` (in path, needed)
- `device` (in path, needed): `desktop` or `phone`.
- `el` (in path, needed): The thing on the copy that is selected, by its number.
- `selector` (in path, needed): A selector written by hand, to be counted in place of the selected thing's own.
## The answer
200, `PickView`: The picker (AE-06): a stored copy of a page with everything on it that can be picked marked, and the one that is selected.
- `available` (boolean, needed)
- `copy` (SnapshotView or null)
- `device` (string, needed)
- `events` (list of string, needed): The names of the events the site has sent lately: a click counted as one of them is added to it.
- `frame` (FrameAt or null)
- `pages` (list of string, needed): The pages of the site that have a stored copy.
- `path` (string, needed)
- `picks` (list of PickedView, needed): What is picked on this site already.
- `reason` (string, needed)
- `selected` (PickSelected or null)
- `site` (string, needed)
## Asking
```sh
curl https://tidekeeper.eu/api/v1/sites/example.org/pick \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN"
```
Parameters
- sitein the address
- neededA site's id or name
- pathin the address
- needed
- devicein the address
- needed`desktop` or `phone`.
- elin the address
- neededThe thing on the copy that is selected, by its number.
- selectorin the address
- neededA selector written by hand, to be counted in place of the selected thing's own.
The answer
Status 200
PickView The picker (AE-06): a stored copy of a page with everything on it that can be picked marked, and the one that is selected.
- available
- booleanneeded
- copy
- SnapshotView or null
- device
- stringneeded
- events
- list of stringneededThe names of the events the site has sent lately: a click counted as one of them is added to it.
- frame
- FrameAt or null
- pages
- list of stringneededThe pages of the site that have a stored copy.
- path
- stringneeded
- picks
- list of PickedViewneededWhat is picked on this site already.
- reason
- stringneeded
- selected
- PickSelected or null
- site
- stringneeded
Asking
curl https://tidekeeper.eu/api/v1/sites/example.org/pick \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/pick", { headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, }, }).then((r) => r.json());