View Source Bbox.Candidates (bbox v0.1.0)

Candidates module.

Link to this section Summary

Functions

Get candidate by code.

Create a new candidate.

List all candidates.

Link to this section Functions

@spec get_by_code!(charlist()) :: %Bbox.Candidates.Candidate{
  __meta__: term(),
  code: term(),
  email: term(),
  first_name: term(),
  id: term(),
  inserted_at: term(),
  last_name: term(),
  party: term(),
  party_id: term(),
  updated_at: term()
}

Get candidate by code.

@spec insert!(map()) :: %Bbox.Candidates.Candidate{
  __meta__: term(),
  code: term(),
  email: term(),
  first_name: term(),
  id: term(),
  inserted_at: term(),
  last_name: term(),
  party: term(),
  party_id: term(),
  updated_at: term()
}

Create a new candidate.

@spec list!() :: [
  %Bbox.Candidates.Candidate{
    __meta__: term(),
    code: term(),
    email: term(),
    first_name: term(),
    id: term(),
    inserted_at: term(),
    last_name: term(),
    party: term(),
    party_id: term(),
    updated_at: term()
  }
]

List all candidates.