Bundestag

Elixir client for the German Bundestag DIP API.

Installation

Add bundestag to your dependencies in mix.exs:

def deps do
  [
    {:bundestag, "~> 1.0"}
  ]
end

Usage

# Create a client
client = Bundestag.client("your-api-key")

# Stream all persons
client
|> Bundestag.persons()
|> Enum.take(10)

# Filter by name
alias Bundestag.Model.PersonParams

client
|> Bundestag.persons(%PersonParams{name: "Merkel, Angela"})
|> Enum.to_list()

Results are lazily streamed, pagination is handled automatically.

API Key

Get your API key from the Bundestag API portal.