A REST API for state, county, and city boards. Created at #HackOmaha 2013
We're slowly adding in authentication. Just don't do anything you wouldn't want your mother to see, for now.
We're on Twitter! @openlocalboards
Get all states /states
Get all cities in a state /states/:state_abbreviation
Get all counties in a state /states/:state_abbreviation/counties
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 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 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
active = [true,false,all]
defaults to true
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 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 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"
}
}
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
Who? Me?
Yes you!
But all I know is RSpec!
Well that's perfect!
Why?
Because we need tests!