Examples of Open Data Tables with JavaScript

The following Open Data Tables provide a few examples of YQL's abilities:

Hello World Table

The following Open Data Table allows you to search a fictional table in which "a" is the path and "b" is the term.

This table showcases the following:

  • use of E4X to form the response

Run this example in the YQL console.

Yahoo! Messenger Status

The following Open Data Table allows you to see the status of a Yahoo! Messenger user.

The table showcases the following:

  • use of JavaScript to check Yahoo! Messenger status
  • use of E4X to form the response

Run this example in the YQL console.

OAuth Signed Request to Netflix

The following Open Data Table allows you to make a two-legged OAuth signed request to Netflix. It performs a search on the Netflix catalog for specific titles.

This table showcases the following:

  • access an authenticating API that requires signatures
  • use an external JavaScript library

Run this example in the YQL console.

Request for a Flickr frob

The following Open Data Table example returns the frob, which is analogous to the request token in OAuth.

This table showcases the following:

  • access an authenticating API that requires signatures
  • use an external JavaScript library
  • sign a request, then send the request using y.rest
  • require the HTTPS protocol (since private keys are being transmitted)

Run this example in the YQL console.

The following Open Data Table retrieves information about celebrities whose birthday is today by default, or optionally, on a specific date.

This table showcases the following:

  • Creating an API/table from HTML data
  • Mixing and matching Web service requests with HTML scraping
  • Using E4X for creating new objects, filtering, and searching
  • Parallel dispatching of query/REST calls
  • Handling page parameters

Run this example in the YQL console.

Shared Yahoo! Applications

The following Open Data Table provides a list of Yahoo! Applications that you and your friends have installed, indicating whether each app is installed exclusively by you, your friends, or both.

This table showcases the following:

  • complex E4X usage, including namespaces, filtering, searching, and creation
  • authenticated calls to Yahoo! Social APIs using y.query
  • setting a security level to user to force authenticated calls only
  • optional variable that changes the function (searches on a specific friend)
  • handling page parameters

Run this example in the YQL console.

CSS Selector for HTML

The following Open Data Table allows you to filter HTML using CSS selectors.

This table showcases the following:

  • importing external JavaScript utility functions
  • calling a YQL query within execute

Run this example in the YQL console.

Table of Contents