Have ideas to improve npm?Join in the discussion! »

    propublica-congress-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.11 • Public • Published

    SDK for the ProPublica Congress API

    An SDK for the ProPublica Congress API, written in Typescript.

    Currently a work-in-progress, but has a majority of the endpoints available.

    Usage

    const client = new CongressAPI('my_api_key');
     
    const result = client.api.getVotesForDateRange(}
      chamber: 'senate',
      startDate: new Date('2019-06-20'),
      endDate: new Date('2019-07-13'),
    );
     
    result.then(res => console.log(res));
     

    API

    • Votes

      • getRecentVotes
      • getRollCallVote
      • getVotesForDate
      • getVotesForDateRange
    • Members

      • getAllMembers
      • getMember
      • getNewMembers
      • getMembersForState
      • getLeavingMembers
      • getMemberVotePositions
      • getMemberVoteComparison
    • Floor Actions

      • getRecentFloorActions
      • getFloorActionsForDate
    • Committees

      • getAllCommittees
      • getCommittee
      • getRecentHearings
      • getCommitteeHearings
      • getSubcommittee

    Missing Endpoints

    • Votes

      • personal explanations
    • Members

      • expenses
    • Bills

      • getRecentBills
      • getRecentBillsForMember
      • getRecentBillsForSubject
      • getUpcomingBills
      • getBill
      • getAmendmentsForBill
      • getSubjectsForBill
      • getRelatedBillsForBill
      • getCosponsorsForBill
      • searchSubjects
      • searchBills
    • Statements

      • getRecentStatements
      • getStatementsForDate
      • getStatementsForSearch
      • getStatementSubjects
      • getStatementsForSubject
      • getStatementsForMember
      • getStatementsForBill
      • getRecentCommitteeStatements
      • getCommitteeStatementsForDate
      • getCommitteeStatementsForSearch
    • Nominations

      • getRecentNominations
      • getNomination
      • getNomineesForState
    • Lobbying

      • getRecentFilings
      • getFilingsForSearch
      • getFiling
    • Other

      • getStatePartyCounts

    API subject to change.

    Install

    npm i propublica-congress-sdk

    DownloadsWeekly Downloads

    1

    Version

    0.2.11

    License

    MIT

    Unpacked Size

    53.6 kB

    Total Files

    35

    Last publish

    Collaborators

    • avatar