Code Monkey home page Code Monkey logo

yql-node's Introduction

yql-node

NPM

A small module providing utility methods for accessing YQL API. Provides optional OAuth access helper. Most other node modules for YQL failed for me on large query strings so this one uses POST method.

Installation

npm install yql-node --save

Usage

  //call public endpoints out of the box by simple require
  var yql = require('yql-node');
  //or set the instance to use OAuth and non-public endpoint like this
  var yqlWithOAuth = require('yql-node').withOAuth('CONSUMER KEY','CONSUMER SECRET');
  
  var query = 'select * from html where url="http://example.com"; ';

  //these two calls will produce same results
  
  //response passed to your callback will a string containing the YQL query result
  //so you read data straight from it
  
  yql.execute(query, function(error,response){
    console.log(response);
  });

  yqlWithOAuth.execute(query, function(error,response){
    console.log(response);
  });

Dependencies and credits

[needle] (https://www.npmjs.com/package/needle) [oauth] (https://www.npmjs.com/package/oauth)

Contributing

If you find yourself wishing for a feature it doesn't have - feel free to fork, add it and generate a pull request. All contributions welcome.

Licence

[MIT] (https://github.com/djordjelacmanovic/yql-node/blob/master/LICENSE)

Release History

  • 0.1.5 Bug fixes and example improvement
  • 0.1.0 Initial release

yql-node's People

Contributors

djordjelacmanovic avatar

Watchers

James Cloos avatar  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.