Skip to content

Commit a61c6db

Browse files
committed
Update docs for congress API. Update copyright to 2014.
1 parent 7b26179 commit a61c6db

File tree

3 files changed

+105
-23
lines changed

3 files changed

+105
-23
lines changed

docs/source/conf.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
# General information about the project.
3636
project = u'python-sunlight'
37-
copyright = u'2012, Sunlight Labs'
37+
copyright = u'2014, Sunlight Labs'
3838

3939
# The version info for the project you're documenting, acts as replacement for
4040
# |version| and |release|, also used in various other places throughout the
@@ -84,7 +84,16 @@
8484

8585
# The theme to use for HTML and HTML Help pages. See the documentation for
8686
# a list of builtin themes.
87-
html_theme = 'default'
87+
88+
# on_rtd is whether we are on readthedocs.org
89+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
90+
91+
if not on_rtd: # only import and set the theme if we're building docs locally
92+
import sphinx_rtd_theme
93+
html_theme = 'sphinx_rtd_theme'
94+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
95+
96+
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
8897

8998
# Theme options are theme-specific and customize the look and feel of a theme
9099
# further. For a list of options available for each theme, see the

docs/source/services/congress.rst

Lines changed: 84 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,105 @@
44
sunlight.congress
55
=================
66

7-
The `Sunlight Labs Congress API
8-
<http://services.sunlightlabs.com/docs/Sunlight_Congress_API/>`_
9-
provides methods for obtaining basic information on Members of Congress,
10-
legislator IDs used by various websites, and geographical lookups between
11-
places and the politicians that represent them. The primary purpose of
12-
the API is to facilitate mashups involving politicians and the various
13-
other APIs that are out there.
7+
The `Sunlight Congress API
8+
<http://sunlightlabs.github.io/congress/>`_
9+
provides methods for obtaining information for the people and work of
10+
Congress. Information on legislators, districts, committees, bills,
11+
votes, as well as real-time notice of hearings, floor activity and
12+
upcoming bills.
1413

14+
Congress
15+
========
16+
17+
.. autoclass:: sunlight.services.congress.Congress
18+
19+
Class methods that do not specify positional arguments accept `filtering <http://sunlightlabs.github.io/congress/index.html#filtering>`_, `pagination <http://sunlightlabs.github.io/congress/index.html#pagination>`_, and `sorting <http://sunlightlabs.github.io/congress/index.html#sorting>`_ parameters as keyword arguments. See each method's API page for specfic filtering arguments.
1520

1621
Legislators
17-
===========
22+
-----------
1823

1924
This set of Congress API methods deal with federal legislators.
2025
For detailed documentaion on the return value of these methods see
21-
`legislator fields <http://services.sunlightlabs.com/docs/congressapi/legislators.get(List)/>`_.
26+
`legislator fields <http://sunlightlabs.github.io/congress/legislators.html#fields>`_.
27+
28+
.. automethod:: sunlight.services.congress.Congress.legislators
29+
.. automethod:: sunlight.services.congress.Congress.legislator
30+
.. automethod:: sunlight.services.congress.Congress.all_legislators_in_office
31+
.. automethod:: sunlight.services.congress.Congress.locate_legislators_by_lat_lon
32+
.. automethod:: sunlight.services.congress.Congress.locate_legislators_by_zip
33+
34+
Bills
35+
=====
36+
37+
This set of Congress API methods deal with Congressional bills.
38+
For detailed documentaion on the return value of these methods see
39+
`bill fields <http://sunlightlabs.github.io/congress/bills.html#fields>`_.
2240

23-
.. automethod:: sunlight.services.congress.congress.legislators
24-
.. automethod:: sunlight.services.congress.congress.legislator_search
25-
.. automethod:: sunlight.services.congress.congress.legislators_for_zip
26-
.. automethod:: sunlight.services.congress.congress.legislators_for_lat_lon
41+
.. automethod:: sunlight.services.congress.Congress.bills
42+
.. automethod:: sunlight.services.congress.Congress.bill
43+
.. automethod:: sunlight.services.congress.Congress.search_bills
44+
.. automethod:: sunlight.services.congress.Congress.upcoming_bills
2745

2846
Districts
2947
=========
3048

31-
Pair of methods for retrieving districts. District dictionaries have a `'state'` and `'number'` key
32-
(ex. `{'state': 'NC', 'number': '3'}`)
49+
Pair of methods for retrieving districts. District dictionaries have a `'state'` and `'district'` key
50+
(ex. `{'state': 'NC', 'district': '4'}`).
3351

3452

35-
.. automethod:: sunlight.services.congress.congress.districts_for_zip
36-
.. automethod:: sunlight.services.congress.congress.districts_for_lat_lon
53+
.. automethod:: sunlight.services.congress.Congress.locate_districts_by_lat_lon
54+
.. automethod:: sunlight.services.congress.Congress.locate_districts_by_zip
3755

3856
Committees
3957
==========
4058

41-
Methods for dealing with committees.
59+
This set of Congress API methods deal with legislative committees.
60+
For detailed documentaion on the return value of these methods see
61+
`committee fields <http://sunlightlabs.github.io/congress/committees.html#fields>`_.
62+
63+
.. automethod:: sunlight.services.congress.Congress.committees
64+
65+
Amendments
66+
==========
67+
68+
This set of Congress API methods deal with amendments.
69+
For detailed documentaion on the return value of these methods see
70+
`committee fields <http://sunlightlabs.github.io/congress/amendments.html#fields>`_.
71+
72+
.. automethod:: sunlight.services.congress.Congress.amendments
73+
74+
Votes
75+
=====
76+
77+
This set of Congress API methods deal with votes.
78+
For detailed documentaion on the return value of these methods see
79+
`vote fields <http://sunlightlabs.github.io/congress/votes.html#fields>`_.
80+
81+
.. automethod:: sunlight.services.congress.Congress.votes
82+
83+
Floor Updates
84+
=============
85+
86+
This set of Congress API methods deal with floor updates.
87+
For detailed documentaion on the return value of these methods see
88+
`floor update fields <http://sunlightlabs.github.io/congress/floor_updates.html#fields>`_.
89+
90+
.. automethod:: sunlight.services.congress.Congress.floor_updates
91+
92+
Hearings
93+
========
94+
95+
This set of Congress API methods deal with committee hearings.
96+
For detailed documentaion on the return value of these methods see
97+
`hearing fields <http://sunlightlabs.github.io/congress/hearings.html#fields>`_.
98+
99+
.. automethod:: sunlight.services.congress.Congress.hearings
100+
101+
Nominations
102+
===========
103+
104+
This set of Congress API methods deal with nominations made by the President of the United States.
105+
For detailed documentaion on the return value of these methods see
106+
`nominations fields <http://sunlightlabs.github.io/congress/nominations.html#fields>`_.
42107

43-
.. automethod:: sunlight.services.congress.congress.committees
44-
.. automethod:: sunlight.services.congress.congress.committee_detail
45-
.. automethod:: sunlight.services.congress.congress.committees_for_legislator
108+
.. automethod:: sunlight.services.congress.Congress.nominations
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _sunlight.congress_deprecated:
2+
3+
=================
4+
sunlight.congress_deprecated
5+
=================
6+
7+
The `Sunlight Labs Congress API
8+
<http://services.sunlightlabs.com/docs/Sunlight_Congress_API/>`_
9+
is deprecated in favor of the new `Sunlight Congress API <http://sunlightlabs.github.io/congress/migration.html>`_
10+

0 commit comments

Comments
 (0)