diff --git a/README.rst b/README.rst index df32528..f513200 100644 --- a/README.rst +++ b/README.rst @@ -22,77 +22,3 @@ python >= 2.4 simplejson >= 1.8 (not required with Python 2.6, will use built-in ``json`` module) -Usage -===== - -To initialize the api, all that is required is for it to be imported and for an -API key to be defined. - -(If you do not have an API key visit http://services.sunlightlabs.com/api/ to -register for one.) - -Import TransparencyData class and set your API key: - - >>> from transparencydata import TransparencyData - >>> td = TransparencyData('sunlight-api-key') - -------------------- -Parameter Operators -------------------- - -Some parameters allow multiple values or greater than, less than, or between operations. We allow operators to be added similar to the method used by the Django ORM. The operator is appended to the end of the parameter name using double underscore. - - >>> td.contributions(amount=100) # contributions equal to 100 dollars - >>> td.contributions(amount__lt=100) # contributions less than 100 dollars - - >>> td.contributions(cycle=1990) # contributions from the 1990 election cycle - >>> td.contributions(cycle__in=(1990,2008)) # contributions from the 1990 and 2008 election cycles - -gt - Greater than specified value. - -lt - Less than specified value. - -between - Between the lesser value and greater value. Parameters must be passed as a two-value tuple or list. - - >>> td.contributions(date__between=(start_date, end_date)) - -in - Matches any in a range of values. Parameter must be a tuple or list. - - -See the parameter documentation (http://transparencydata.com/api/) to find out which operators are valid for each parameter. - ----------------------- -Campaign Contributions ----------------------- - -To find all contributions to Chris Van Hollen from the state of CA during the 2008 election cycle: - - >>> td.contributions(cycle=2008, contributor_state='CA', recipient_ft='van hollen') - -A list of valid contributions parameters can be accessed programmatically: - - >>> print td.contributions.parameters - -Parameter documentation: http://transparencydata.com/api/#contributions - -Response documentation: http://transparencydata.com/docs/#contributions - --------- -Lobbying --------- - -To find all lobbying conducted by John Wonderlich: - - >>> td.lobbying(lobbyist_ft='john wonderlich') - -A list of valid lobbying parameters can be accessed programmatically: - - >>> print td.lobbying.parameters - -Parameter documentation: http://transparencydata.com/api/#lobbying - -Response documentation: http://transparencydata.com/docs/#lobbying \ No newline at end of file diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index aeee33a..06a4173 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/influenceexplorer.doctree b/docs/_build/doctrees/influenceexplorer.doctree index 1f8641e..5dbd783 100644 Binary files a/docs/_build/doctrees/influenceexplorer.doctree and b/docs/_build/doctrees/influenceexplorer.doctree differ diff --git a/docs/_build/doctrees/transparencydata.doctree b/docs/_build/doctrees/transparencydata.doctree index cae8f7c..5b61e4e 100644 Binary files a/docs/_build/doctrees/transparencydata.doctree and b/docs/_build/doctrees/transparencydata.doctree differ diff --git a/docs/_build/html/_sources/influenceexplorer.txt b/docs/_build/html/_sources/influenceexplorer.txt index af17008..95205df 100644 --- a/docs/_build/html/_sources/influenceexplorer.txt +++ b/docs/_build/html/_sources/influenceexplorer.txt @@ -1,18 +1,35 @@ Influence Explorer API ====================== + .. automodule:: influenceexplorer .. autoclass:: influenceexplorer.InfluenceExplorer + +---------------------- +General Entity Methods +---------------------- .. autoclass:: influenceexplorer.Entities() :members: +------------------ +Politician Methods +------------------ + .. autoclass:: influenceexplorer.Politician() :members: +-------------------- +Organization Methods +-------------------- + .. autoclass:: influenceexplorer.Organization() :members: +------------------ +Individual Methods +------------------ + .. autoclass:: influenceexplorer.Individual() :members: \ No newline at end of file diff --git a/docs/_build/html/_sources/transparencydata.txt b/docs/_build/html/_sources/transparencydata.txt index ca69175..b1dac6f 100644 --- a/docs/_build/html/_sources/transparencydata.txt +++ b/docs/_build/html/_sources/transparencydata.txt @@ -1,9 +1,9 @@ Transparency Data API ===================== +----- Usage -===== - +----- The TransparencyData class is constructed with your API key as an initialization parameter: @@ -98,11 +98,11 @@ Federal Grants To find all grants made by the NEA in 2010: - >>> api.grants(agency_ft='national endowment for the arts', fiscal_year='2010') + >>> td.grants(agency_ft='national endowment for the arts', fiscal_year='2010') A list of valid grant parameters can be accessed programmatically: - >>> api.grants.parameters + >>> td.grants.parameters Parameter documentation: http://transparencydata.com/api/grants/ @@ -115,11 +115,11 @@ Federal Contracts To find all federal contracts issued to Bank of America: - >>> api.contracts(vendor_name='bank of america') + >>> td.contracts(vendor_name='bank of america') A list of valid contract parameters can be accessed programmatically: - >>> api.contracts.parameters + >>> td.contracts.parameters Parameter documentation: http://transparencydata.com/api/contracts diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index ef88458..0435ec9 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -60,8 +60,8 @@

python-transparencydata’s documentation