MongoDB service installed and running.
node app
The application runs on port 3000:
http://localhost:3000/
The importer was moved to the following project:
https://github.com/seykron/ogov-importer
Now the importer runs standalone and it is possible to store bills in different data sources.
Anyway, the old importer will be available for some time but it is deprecated:
node app/importer.js
API calls to retrieve information about bills. Bills are available from 01/01/1991 until now.
Lists bills filtering by a range of dates.
Parameters:
- {String | Number} fromDate Either timestamp or date String to filter bills from. Default is the current date, so bills are listed backward.
- {String | Number} toDate Either timestamp or date String to filter bills to. Default is null, so there's no limit listing bills backward.
- {Boolean} backward Indicates whether to list backward on time or not. If it's true, bills are listed since fromDate backward on time until toDate. If it's false bills are listed since fromDate forward on time until toDate. Default is true.
Examples:
/api/bills/list
/api/bills/list?from=09/12/2012&to=01/01/2012&backward=true
Search for bills which subscribers belong to one of the specified parties.
Parameters:
- {String[]} parties List of parties to match in bills. Cannot be null.
- {String | Number} fromDate Either timestamp or date String to filter bills from. Default is the current date, so bills are listed backward.
- {String | Number} toDate Either timestamp or date String to filter bills to. Default is null, so there's no limit listing bills backward.
- {Boolean} backward Indicates whether to list backward on time or not. If it's true, bills are listed since fromDate backward on time until toDate. If it's false bills are listed since fromDate forward on time until toDate. Default is true.
Examples:
/api/bills/findByParties?parties=UCR
/api/bills/findByParties?parties=UCR,FRENTE PERONISTA&from=09/12/2012&to=01/01/2012&backward=true
Search for bills signed off by the specified person.
Parameters:
- {String[]} personId Id(s) of the person that signed off required bills. Cannot be null or empty.
- {String | Number} fromDate Either timestamp or date String to filter bills from. Default is the current date, so bills are listed backward.
- {String | Number} toDate Either timestamp or date String to filter bills to. Default is null, so there's no limit listing bills backward.
- {Boolean} backward Indicates whether to list backward on time or not. If it's true, bills are listed since fromDate backward on time until toDate. If it's false bills are listed since fromDate forward on time until toDate. Default is true.
Examples:
/api/bills/findByPerson?personId=50c51860eebb58f9c55afb54
/api/bills/findByParties?personId=50c51860eebb58f9c55afb54&from=09/12/2012&to=01/01/2012&backward=true
API calls to retrieve information about people envolved with bills.
List people according to specified information.
Parameters:
- {String} [party] Required person party.
- {String} [province] Required person province.
- {String} [name] Required person name. Can be a regexp.
Examples:
/api/people/list
/api/people/list?name=Cristina
/api/people/list?name=^Solanas
Search for people that belong to the specified parties.
Parameters:
- {String[]} parties List of parties which required people belong to. Cannot be null.
- {String} [province] Required person province.
- {String} [name] Required person name. Can be a regexp.
Examples:
/api/people/findByParties?parties=FRENTE%20PARA%20LA%20VICTORIA%20-%20PJ,UCR
/api/people/findByParties?parties=FRENTE%20PARA%20LA%20VICTORIA%20-%20PJ,UCR&&name=CARLOS
Returns the number of presented bills by person.
Parameters:
- {String} [party] Required person party.
- {String} [province] Required person province.
- {String} [name] Required person name. Can be a regexp.
Examples:
/api/people/numberOfPresentedBills
/api/people/numberOfPresentedBills?province=SALTA