getDebates function
http://www.openaustralia.org/api/getDebates
Fetch Debates.
This includes Oral Questions.
Arguments
Note you can only supply one of the following search terms at present.
- type (required)
- One of "representatives" or "senate".
- date
- Fetch the debates for this date.
- search
- Fetch the debates that contain this term.
- person
- Fetch the debates by a particular person ID.
- gid
- Fetch the speech or debate that matches this GID.
- order (optional, when using search or person)
- d for date ordering, r for relevance ordering.
- page (optional, when using search or person)
- Page of results to return.
- num (optional, when using search or person)
- Number of results to return.
Example Response (search)
{
"info" : {
"s" : "cows section:lords",
"results_per_page" : 20,
"page" : 1,
"total_results" : 24,
"first_result" : 1
},
"searchdescription" : "containing the word 'cows' in Senate debates",
"rows" : [{
"gid" : "2009-02-11.70.21",
"hdate" : "2009-02-11",
"htype" : "12",
"major" : "101",
"section_id" : "5316",
"subsection_id" : "5317",
"relevance" : 99,
"speaker_id" : "100114",
"hpos" : "221",
"body" : "Shut the door. I can hear the cows coming home!",
"listurl" : "/senate/?id=2009-02-11.66.2&s=cows+section%3Alords#g70.21",
"speaker" : {
"member_id" : "100114",
"title" : "",
"first_name" : "Barnaby",
"last_name" : "Joyce",
"house" : "2",
"constituency" : "Queensland",
"party" : "National Party",
"person_id" : "10350",
"url" : "/senator/?m=100114"
},
"parent" : {
"body" : "Appropriation (Nation Building and Jobs) Bill (No. 1) 2008-2009; Appropriation (Nation Building and Jobs) Bill (No. 2) 2008-2009; Household Stimulus Package Bill 2009; Tax Bonus for Working Australians Bill 2009; Tax Bonus for Working Australians (Consequential Amendments) Bill 2009; Commonwealth Inscribed Stock Amendment Bill 2009: In Committee"
}
}]
}
Explorer
Try out this function without writing any code!