An API for local government boards
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
README.md
README.rdoc
Rakefile
config.ru
jays_notes.txt

README.md

Local Boards API

About

Description

A REST API for state, county, and city boards. Created at #HackOmaha 2013

Looking for the UI?

We're slowly adding in authentication. Just don't do anything you wouldn't want your mother to see, for now.

Contact

We're on Twitter! @openlocalboards

Base path

http://api.localboards.org

GET jurisdictions

Get all states /states

Get all cities in a state /states/:state_abbreviation

Get all counties in a state /states/:state_abbreviation/counties

GET boards

Get all boards in a specific state /states/:state_abbreviation/boards

Get all boards in a specific county /states/:state_abbreviation/county/:code_id/boards

Get all boards in a specific city /states/:state_abbreviation/city/:city_id/boards

POST board

Post a board in a specific state /states/:state_abbreviation/boards/:board_id

Post a board in a specific county /states/:state_abbreviation/county/:code_id/boards/:board_id

Post a board in a specific city /states/:state_abbreviation/city/:city_id/boards/:board_id

Example Board Data

data: {
  board: {
    title: "Our awesome board",
    seats: 1000000,
    alternating_seats: 17,
    url: "www.ronpaul2012.com"
  }
}

GET members

Get all members in a specific state /states/:state_abbreviation/boards/:id/members

Get all members in a specific county /states/:state_abbreviation/county/:code_id/boards/:id/members

Get all members in a specific city /states/:state_abbreviation/city/:city_id/boards/:id/members

Params

active = [true,false,all]
defaults to true

POST member

Post a member in a specific state board /states/:state_abbreviation/boards/:board_id/members

Post a member in a specific county board /states/:state_abbreviation/county/:code_id/boards/:board_id/members

Post a member in a specific city board /states/:state_abbreviation/city/:city_id/boards/:board_id/members

Example Member Data

data: {
  member: {
    first_name: "John",
    last_name: "Smith",
    board_seat_id: 1
  }
}

The board seat id can be retrieved from the id returned by the seats api.

GET seats

Get all seats in a specific state /states/:state_abbreviation/boards/:id/seats

Get all seats in a specific county /states/:state_abbreviation/county/:code_id/boards/:id/seats

Get all seats specific city /states/:state_abbreviation/city/:city_id/boards/:id/seats

POST seat

Post a member in a specific state board /states/:state_abbreviation/boards/:board_id/members

Post a member in a specific county board /states/:state_abbreviation/county/:code_id/boards/:board_id/members

Post a member in a specific city board /states/:state_abbreviation/city/:city_id/boards/:board_id/members

Example Member Data

data: {
  board_seat: {
    alternate: True,
    title: "Fire Marshall"
  }
}

GET a specific board

in a specific state /states/:state_abbreviation/boards/:id

in a specific county /states/:state_abbreviation/county/:code_id/boards/:id

in a specific city /states/:state_abbreviation/city/:city_id/boards/:id

We need you

Who? Me?

Yes you!

But all I know is RSpec!

Well that's perfect!

Why?

Because we need tests!