get_branch

Description:

This method will return information and a list of allĀ  the offices for a particular branch of a government. Provide *either* a branch name or an id. If a client only wants a subset of the results, it can provide start and count. sort_by allows sorting by district or funds raised. If reverse=true, it sorts districts from highest to lowest, and funds raised from lowest to highest.

Arguments:

  • id: id of the branch.
  • sort_by: Parameter by which you want to sort the results. (district OR funds_raised)
  • start: Show results starting with this value. 0 is the default
  • count: The number of results to display, 10 is default
  • reverse: By default, results are sorted by contribution amount from highest to lowest. reverse=true means sort from lowest to highest.

XML EXAMPLES

Get branch with id = 20 in California
http://ca.api.opencampaigns.com/api/get_branch?id=20

Get branch with name="Board of Supervisors" in San Francisco
http://sf.api.opencampaigns.com/api/get_branch?name=Board%20of%20Supervisors

******************* opencampaigns developers ******************************

We're not checking the subdomain on these functions. They work because the ids are different for branches in different governments, but
if the client was checking for id 20 with sf domain they'd get the ca branch