Coder Social home page Coder Social logo

govtrack-node's People

Contributors

markgx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

govtrack-node's Issues

filter lastname is broken?

When running the example query with gender and lastname I get this error:
Error: JSON parse error: Cannot filter on field: lastname

trying to run example with little success

Hi, I have been trying to dig in to your nifty node wrapper, but I keep getting an error even when I run your example code.

example code

// include the module
var govTrack = require('govtrack-node');

// list current members of Congress
govTrack.findRole({ current: true }, function(err, res) {
  if (!err) {
    // res contains JSON data response
  }
});

govTrack.findPerson({ firstname: 'harry', lastname: 'reid' }, function(err, res) {
  if (!err) {
    // res contains JSON data response
  }
});

node.js response

SyntaxError: Unexpected token C
    at Object.parse (native)
    at Request._callback (/Users/HAL9000/Dropbox/govtrack/node_modules/govtrack-node/lib/govtrack-node.js:14:27)
    at Request.self.callback (/Users/HAL9000/Dropbox/govtrack/node_modules/govtrack-node/node_modules/request/index.js:142:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/Users/HAL9000/Dropbox/govtrack/node_modules/govtrack-node/node_modules/request/index.js:856:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/Users/HAL9000/Dropbox/govtrack/node_modules/govtrack-node/node_modules/request/index.js:808:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:910:16
    at process._tickCallback (node.js:415:13)

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.