<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -446,46 +446,30 @@ Official API documentation at http://api.votesmart.org/docs/Rating.html
 ``getCategories(stateId=None)`` gets a list of Category objects for a given
 state (national if no state provided).
 
-Example of getting all issue categories for New York:
+Example of getting a few of the issue categories for New York:
 
-    &gt;&gt;&gt; for category in votesmart.rating.getCategories('NY'):
+    &gt;&gt;&gt; for category in votesmart.rating.getCategories('NY')[0:5]:
     ...     print category
     2: Abortion Issues
     5: Animal Rights and Wildlife Issues
     11: Business and Consumers
     13: Civil Liberties and Civil Rights
     17: Conservative
-    30: Environmental Issues
-    36: Government Reform
-    37: Gun Issues
-    43: Labor
-    45: Liberal
-    54: Social Issues
-    68: Women's Issues
 
 ``getSigList(categoryId, stateId=None)`` gets a list of Sig objects representing
 all special interest groups associated with a particular category.  Optionally
 a state can be provided to restrict results to a SIG operating within a
 particular state.
 
-Example of getting groups concerned with Environmental Issues:
+Example of getting a few groups concerned with Environmental Issues:
 
-    &gt;&gt;&gt; for sig in votesmart.rating.getSigList(30):
+    &gt;&gt;&gt; for sig in votesmart.rating.getSigList(30)[0:5]:
     ...     print sig
     916: American Land Rights Association
     934: American Lands Alliance
     1081: American Wilderness Coalition
     1702: American Wind Energy Association
     1107: California Park &amp; Recreation Society
-    77: Competitive Enterprise Institute - Environment
-    966: Comprehensive US Sustainable Population
-    109: Defenders of Wildlife Action Fund
-    1826: Environment America
-    1012: League of Conservation Voters
-    922: National Parks Conservation Association
-    1716: Partnership for America
-    664: Republicans for Environmental Protection
-    657: Sierra Club
 
 ``getSig(sigId)`` gets all details available for a special interest group.
 
@@ -535,4 +519,87 @@ Example of getting several details about the state of Virginia:
 votes methods
 -------------
 
-Official API documentation at 
+Official API documentation at http://api.votesmart.org/docs/Votes.html
+
+``getCategories(year, stateId=None)`` gets a list of Category objects for a
+given year and optionally a state (national if no state provided).
+
+Example of getting a few of the national bill categories for 2008:
+
+    &gt;&gt;&gt; for category in votesmart.votes.getCategories(2008)[0:5]:
+    ...     print category
+    2: Abortion Issues
+    4: Agriculture Issues
+    5: Animal Rights and Wildlife Issues
+    10: Budget, Spending and Taxes
+    11: Business and Consumers
+
+``getBill(billId)`` returns a BillDetail object providing details on a particular
+bill.
+
+Example of getting details on HR 7321 Auto Industry Financing bill:
+
+    &gt;&gt;&gt; bill = votesmart.votes.getBill(8528)
+    &gt;&gt;&gt; print bill.officialTitle
+    HR 7321:  To authorize financial assistance to eligible automobile manufacturers, and for other purposes.
+    &gt;&gt;&gt; for sponsor in bill.sponsors:
+    ...     print sponsor
+    Barney  Frank
+    &gt;&gt;&gt; for action in bill.actions:
+    ...     print action
+    2008-12-10 - Passage
+    
+
+``getBillAction(actionId)`` returns a BillAction object providing details on
+a particular action taken on a bill.
+
+Example of getting details on an action for HR 5576:
+
+    &gt;&gt;&gt; print votesmart.votes.getBillAction(8272)
+    HR 5576: Making appropriations for the Departments of Transportation, Treasury, and Housing and Urban Development, the Judiciary, District of Columbia, and independent agencies for the fiscal year ending September 30, 2007, and for other purposes.
+
+``getBillActionVotes(actionId)`` and
+``getBillActionVoteByOfficial(actionId, candidateId)`` retrieve lists of Vote
+objects for a given action (and official).
+
+Example of getting Nancy Pelosi's vote on passage of HR 7321:
+
+    &gt;&gt;&gt; print votesmart.votes.getBillActionVoteByOfficial(23069, 26732)
+    Pelosi, Nancy: Yea
+
+
+There are 7 methods that return Bill objects based on various parameters:
+
+* ``getBillsByCategoryYearState(categoryId, year, stateId=None)``
+* ``getBillsByYearState(year, stateId=None)``
+* ``getBillsByOfficialYearOffice(candidateId, year, officeId=None)``
+* ``getBillsByCandidateCategoryOffice(candidateId, categoryId, officeId=None)``
+* ``getBillsBySponsorYear(candidateId, year)``
+* ``getBillsBySponsorCategory(candidateId, categoryId)``
+* ``getBillsByStateRecent(stateId=None, amount=None)``
+
+Example of getting a few recently tracked bills for 2008:
+
+    &gt;&gt;&gt; for bill in votesmart.votes.getBillsByYearState(2008)[-5:]:
+    ...     print bill
+    HR 7081 
+    HR 2095 Amtrak Reauthorization
+    HR 2095 
+    HR 6867 Emergency Extended Unemployment Compensation
+    HR 7321 Auto Industry Financing
+
+
+``getVetoes(candidateId)`` returns all vetoes for a particular executive.
+
+Example of getting all of George W. Bush's vetoes:
+
+    &gt;&gt;&gt; for veto in votesmart.votes.getVetoes(22369):
+    ...     print veto
+    HR 6331 Medicare Bill
+    HR 6124 Second Farm, Nutrition, and Bioenergy Act of 2007 (Farm Bill)
+    HR 2419 Farm, Nutrition, and Bioenergy Act of 2007 (Farm Bill)
+    HR 1585 
+    HR 3963 Children's Health Insurance Program Reauthorization Act of 2007 (CHIP)
+    HR 976 State Children's Health Insurance Program (CHIP) Reauthorization
+    S 5 Stem Cell Research Act of 2007
+    HR 1591 Emergency Supplemental Appropriations Bill of 2007 with Iraq Withdrawal Timeline</diff>
      <filename>README.rst</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
 import doctest
-doctest.testfile('README.rst', verbose= True)
+doctest.testfile('README.rst', verbose=False)</diff>
      <filename>test_votesmart.py</filename>
    </modified>
    <modified>
      <diff>@@ -139,13 +139,51 @@ class State(VotesmartApiObject):
 class StateDetail(VotesmartApiObject):
     def __str__(self):
         return ' '.join((self.stateId, self.name))
+    
+class BillSponsor(VotesmartApiObject):
+    def __str__(self):
+        return self.name
+    
+class BillAction(VotesmartApiObject):
+    def __str__(self):
+        return ' - '.join((self.statusDate, self.stage))
+    
+class BillAmendment(VotesmartApiObject):
+    def __str__(self):
+        return self.title
+    
+class BillDetail(VotesmartApiObject):
+    def __init__(self, d):
+        sponsors = d.pop('sponsors')
+        actions = d.pop('actions')
+        amendments = d.pop('ammendments')  # ammendments -- sic
+        self.sponsors = _result_to_obj(BillSponsor, sponsors['sponsor'])
+        self.actions = _result_to_obj(BillAction, actions['action'])
+        if amendments:
+            self.amendments = _result_to_obj(BillAmendment, actions['ammendment'])
+        self.__dict__.update(d)
+
+class BillActionDetail(VotesmartApiObject):
+    def __str__(self):
+        return self.officialTitle
+
+class Bill(VotesmartApiObject):
+    def __str__(self):
+        return ' '.join((self.billNumber, self.title))
+        
+class Vote(VotesmartApiObject):
+    def __str__(self):
+        return ': '.join((self.candidateName, self.action))
+    
+class Veto(VotesmartApiObject):
+    def __str__(self):
+        return ' '.join((self.billNumber, self.billTitle))
 
 def _result_to_obj(cls, result):
     if isinstance(result, dict):
         return [cls(result)]
     else:
         return [cls(o) for o in result]
-    
 
 class votesmart(object):
     
@@ -468,64 +506,77 @@ class votesmart(object):
         @staticmethod
         def getCategories(year, stateId=None):
             params = {'year':year, 'stateId':stateId}
-            result = votesmart._apicall('getCategories', params)['categories']['category']
+            result = votesmart._apicall('Votes.getCategories', params)
+            return _result_to_obj(Category, result['categories']['category'])
             
         @staticmethod
         def getBill(billId):
             params = {'billId':billId}
-            result = votesmart._apicall('getBill', params)['bill']
+            result = votesmart._apicall('Votes.getBill', params)
+            return BillDetail(result['bill'])
         
         @staticmethod
         def getBillAction(actionId):
             params = {'actionId':actionId}
-            result = votesmart._apicall('getBillAction', params)['action']
+            result = votesmart._apicall('Votes.getBillAction', params)
+            return BillActionDetail(result['action'])
         
         @staticmethod
         def getBillActionVotes(actionId):
             params = {'actionId':actionId}
-            result = votesmart._apicall('getBillActionVotes', params)['votes']['vote']
+            result = votesmart._apicall('Votes.getBillActionVotes', params)
+            return _result_to_obj(Vote, result['votes']['vote'])
         
         @staticmethod
         def getBillActionVoteByOfficial(actionId, candidateId):
             params = {'actionId':actionId, 'candidateId':candidateId}
-            result = votesmart._apicall('getBillActionVoteByOfficial', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillActionVoteByOfficial', params)
+            return Vote(result['votes']['vote'])
             
         @staticmethod
         def getBillsByCategoryYearState(categoryId, year, stateId=None):
             params = {'categoryId':categoryId, 'year':year, 'stateId':stateId}
-            result = votesmart._apicall('getBillsByCategoryYearState', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillsByCategoryYearState', params)
+            return _result_to_obj(Bill, result['bills']['bill'])
             
         @staticmethod
         def getBillsByYearState(year, stateId=None):
             params = {'year':year, 'stateId':stateId}
-            result = votesmart._apicall('getBillsByYearState', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillsByYearState', params)
+            return _result_to_obj(Bill, result['bills']['bill'])
             
         @staticmethod
         def getBillsByOfficialYearOffice(candidateId, year, officeId=None):
             params = {'candidateId':candidateId, 'year':year, 'officeId':officeId}
-            result = votesmart._apicall('getBillsByOfficialYearOffice', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillsByOfficialYearOffice', params)
+            return _result_to_obj(Bill, result['bills']['bill'])
             
         @staticmethod
         def getBillsByCandidateCategoryOffice(candidateId, categoryId, officeId=None):
             params = {'candidateId':candidateId, 'categoryId':categoryId, 'officeId':officeId}
-            result = votesmart._apicall('getBillsByCandidateCategoryOffice', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillsByCandidateCategoryOffice', params)
+            return _result_to_obj(Bill, result['bills']['bill'])
             
         @staticmethod
         def getBillsBySponsorYear(candidateId, year):
             params = {'candidateId':candidateId, 'year':year}
-            result = votesmart._apicall('getBillsBySponsorYear', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillsBySponsorYear', params)
+            return _result_to_obj(Bill, result['bills']['bill'])
             
         @staticmethod
         def getBillsBySponsorCategory(candidateId, categoryId):
             params = {'candidateId':candidateId, 'categoryId':categoryId}
-            result = votesmart._apicall('getBillsBySponsorCategory', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillsBySponsorCategory', params)
+            return _result_to_obj(Bill, result['bills']['bill'])
         
         @staticmethod    
         def getBillsByStateRecent(stateId=None, amount=None):
             params = {'stateId':stateId, 'amount':amount}
-            result = votesmart._apicall('getBillsByStateRecent', params)['bills']['bill']
+            result = votesmart._apicall('Votes.getBillsByStateRecent', params)
+            return _result_to_obj(Bill, result['bills']['bill'])
                 
         @staticmethod
         def getVetoes(candidateId):
             params = {'candidateId': candidateId}
-            result = votesmart._apicall('getVetoes', params)['vetoes']['veto']
+            result = votesmart._apicall('Votes.getVetoes', params)
+            return _result_to_obj(Veto, result['vetoes']['veto'])</diff>
      <filename>votesmart.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7880d03f2c0d48ae7cb81c585e1b3b087af14080</id>
    </parent>
  </parents>
  <author>
    <name>James Turk</name>
    <email>james.p.turk@gmail.com</email>
  </author>
  <url>http://github.com/sunlightlabs/python-votesmart/commit/ba9fd58eb85293596de53472f4be0078ac73fe8a</url>
  <id>ba9fd58eb85293596de53472f4be0078ac73fe8a</id>
  <committed-date>2008-12-19T13:04:24-08:00</committed-date>
  <authored-date>2008-12-19T13:04:24-08:00</authored-date>
  <message>test and documented votes</message>
  <tree>808d4e552c259d46ddbb6c546d868ecd0da300f8</tree>
  <committer>
    <name>James Turk</name>
    <email>james.p.turk@gmail.com</email>
  </committer>
</commit>
