Code Monkey home page Code Monkey logo

nyt-congress's Introduction

##NYT Congress API Code Climate

Simple Ruby querying of The New York Times Congress API

####Available Methods:

###Member Queries #####Member Lists

Members.lists(congress_number, chamber, state=nil, district=nil)
    congress_number = 102–113 (House of Representatives)
                       80–113 (Senate)
            chamber = "house" or "senate"
   state (optional) = Two-letter state code, ex. "CA", "OR", "NY"
district (optional) = House of Representatives district number

######Notes When passing district as an argument, state must also be present.

#####Member Bio & Roles

Members.bio_and_roles(member_id)
member_id = Alphanumeric

######Notes member_id is returned by the Members.lists method.

#####List New Members

Members.new_members

#####Current Members by State or District

Members.current_members_by_state_or_district(chamber, state, district=nil)
chamber  = "house" or "senate"
state    = Two-letter state code, ex. "CA", "OR", "NY"
district = House of Representatives district number

######Notes District is only required when querying House members.

###Vote Queries #####Roll-Call Votes

Votes.roll_call(congress_number, chamber, session_number, roll_call_number)
 congress_number = 102–113 (House of Representatives)
                    80–113 (Senate)
         chamber = "house" or "senate"
  session_number = 1 | 2 | [special session number]
roll_call_number = Integer

######Notes A detailed list of Congressional Sessions and their numbers can be found at this address:

http://www.senate.gov/reference/resources/pdf/congresses2.pdf

Roll-call numbers can be found on the official U.S. Senate and House websites:

Senate: http://www.senate.gov/pagelayout/legislative/a_three_sections_with_teasers/votes.htm
 House: http://clerk.house.gov/art_history/house_history/index.html

#####Votes by Type

Votes.votes_by_type(congress_number, chamber, vote_type)
congress_number = 102–113 (House of Representatives)
                       80–113 (Senate)
        chamber = "house" or "senate"
        chamber = "house" or "senate"
      vote_type = missed_votes | party_votes | loneno | perfect

######Notes

missed_votes: information about the voting attendance of each member of chamber and congress-number.

party_votes: information about each member's voting behavior with respect to his or her party (the member must have voted at least once).

loneno: for each member of chamber and congress-number, this response lists the number of times the member was the only person to vote No.

perfect: lists the members of chamber and congress-number who voted Yes or No on every vote for which he or she was eligible.

For more information, see Data Returned:

http://developer.nytimes.com/docs/congress_api#votes-by-type-data-returned

#####Votes by Date

Votes.by_month(chamber, year, month)
chamber = "house" or "senate"
year    =
month   = 

######Notes

Takes either a single date or a range of dates.

#####Nomination Votes

Votes.senate_nomination_votes(congress_number)
congress_number = 

###Bill Queries #####Recent Bills

Bills.recent

#####Bills by Member

Bills.by_member

#####Bill Details

Bills.bill_details(congress_number, bill_id)

#####Bill Subjects/Amendments and Related Bills

Bills.subjects_amendments_and_related_bills(congress_number, bill_id, resource)

#####Bill Cosponsors

Bills.cosponsors(congress_number, bill_id)

nyt-congress's People

Contributors

badascii avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.