GithubHelp home page GithubHelp logo

isabella232 / node-yql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thethingsystem/node-yql

0.0 0.0 0.0 149 KB

A YQL (Yahoo Query Language) module for NodeJS

Home Page: http://derek.io/blog/2010/node-yql/

License: Other

JavaScript 100.00%

node-yql's Introduction

node-yql

node-yql is a YQL client for node.js

What is YQL?

Yahoo! Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web services. With YQL, apps run faster with fewer lines of code and a smaller network footprint.

Yahoo! and other websites across the Internet make much of their structured data available to developers, primarily through Web services. To access and query these services, developers traditionally endure the pain of locating the right URLs and documentation to access and query each Web service.

With YQL, developers can access and shape data across the Internet through one simple language, eliminating the need to learn how to call different APIs.

Example YQL Queries

  • SELECT title,abstract FROM search.web WHERE query="pizza";
  • SELECT * FROM weather.forecast WHERE location = 90066;
  • SELECT * FROM twitter.user.timeline WHERE id = 'yql';
  • SELECT * FROM flickr.photos.interestingness(20);

You may find more examples at the YQL console

Installing node-yql

First, make sure you have Node installed. You can find instructions for installing it at http://nodejs.org/#download

With Node installed, you can install the node-yql module 2 ways:

  1. The easiest method is to use NPM, node's package manager. Once you have NPM installed, simply run:

    $ npm install yql

  2. Or, you can clone the github repository, and just be sure you add this module's path to the $NODE_PATH env variable

    $ git clone http://github.com/drgath/node-yql.git

Use within Node

A basic example

YQL.exec()

yql.js exports a single method, exec.

function exec (string query [, function callback] [, object params] [, object httpOptions])

  • query - A YQL query
  • callback - A callback function that receives the result of the query
  • params - Optional parameters for use within the YQL request querystring. Typical uses; including environment files, variable replacement within the YQL statement.
  • httpOptions - Additional HTTP options
    • ssl: A boolean true/false flag to enable HTTPS (default: false)
    • Any valid HTTP header

Additional YQL Resources

node-yql's People

Contributors

derek avatar mrose17 avatar codewhale avatar arcturus 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.