Commands

Every command, argument and option of abgeordnetenwatch 0.0.8, read from the CLI itself.

Global options

These options work with every command.

OptionDescriptionDefault
-V, --version output the version number
--base-url <url> API base URL https://www.abgeordnetenwatch.de
--timeout <ms> time limit per request in milliseconds, whole response included (0 disables) 30000
--user-agent <ua> User-Agent header value
--max-retries <n> retries for transient 429/503 responses 2
--max-response-bytes <n> cap response body size in bytes (0 = unlimited) 104857600
--compact print JSON on a single line instead of pretty-printed

abgeordnetenwatch list

List a collection, with optional filters, sorting and paging

abgeordnetenwatch list [options] <entity> [filters...]

Arguments

<entity> required
entity collection (18 available; see 'entities')
[filters…] optional
field filters as key=value, e.g. sex=f 'year_of_birth[gt]=1990'

Options

OptionDescriptionDefault
--range-start <n> 0-based offset of the first item
--range-end <n> page size (number of items; API honours up to 1000, else falls back to 100)
--sort-by <field> field name to sort by (e.g. last_name, id)
--sort-direction <dir> asc or desc
--data-only print just the data array (not the meta envelope)

abgeordnetenwatch get

Fetch a single entity by id

abgeordnetenwatch get [options] <entity> <id>

Arguments

<entity> required
entity collection (see 'entities')
<id> required
numeric entity id

Options

OptionDescriptionDefault
--data-only print just the data object (not the meta envelope)

abgeordnetenwatch count

Count how many entities match the given filters

abgeordnetenwatch count [options] <entity> [filters...]

Arguments

<entity> required
entity collection (see 'entities')
[filters…] optional
field filters as key=value