View node-yql.js
1 2 3 4 5 6 7 8 9
var YQL = require('yql');
 
var query = new YQL('SELECT * FROM weather.forecast WHERE (location = 94089)');
 
query.exec(function(err, data) {
var location = data.query.results.channel.location;
var condition = data.query.results.channel.item.condition;
console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.');
});
View gemini.php
1 2 3 4 5 6 7 8 9 10
<?php
/* Example code to access Gemini API: Fetch advertiser information, create a new campaign and read specific campaign data
Prerequisites:
1. Sign up for an account on https://admanager.yahoo.com
2. Download YahooOAuth2.class.php file from here: https://github.com/saurabhsahni/php-yahoo-oauth2/blob/master/YahooOAuth2.class.php
3. PHP modules for json_decode & curl
4. A webserver running this code on port 80/443. Yahoo OAuth callback is only supported on these ports
*/
require "YahooOAuth2.class.php";
View flickr.js
1 2 3 4 5 6 7 8 9
<script>
var yqlCallback = function(data) {
console.log(data);
var photo = data.query.results.photo[0];
alert(photo.title);
};
</script>
 
<script src="https://query.yahooapis.com/v1/public/yql?q=select * from flickr.photos.search where has_geo='true' and tags='New York City' and api_key='YOUR KEY'&format=json&callback=yqlCallback"></script>
View node-placefinder.js
1 2 3 4 5 6 7 8 9
var request = require('request');
var qs = require('querystring');
 
var url = 'https://yboss.yahooapis.com/geo/placefinder';
 
var params = qs.stringify({
q: '701 First Ave, Sunnyvale, CA',
flags: 'J'
});
View node-placespotter.js
1 2 3 4 5 6 7 8 9 10
var request = require('request');
var qs = require('querystring');
 
var url = 'https://yboss.yahooapis.com/geo/placespotter';
 
var params = qs.stringify({
documentContent: 'Yahoo is headquartered in Sunnyvale, CA',
documentType: 'text/plain',
outputType: 'json'
});
View boss.cs
1 2 3 4 5 6 7 8 9 10
using System;
using System.Net;
using OAuth;
 
namespace ConsoleApplication1{
class Program{
static void Main(string[] args){
string consumerKey = "...";
string consumerSecret = "...";
var uri = new Uri("https://yboss.yahooapis.com/ysearch/web?callback=json2&q=flu");
View node-weather.js
1 2 3 4 5 6 7 8 9 10
var YQL = require('yql');
 
var query = new YQL('select * from weather.forecast where (location = 94089)');
 
query.exec(function(err, data) {
var location = data.query.results.channel.location;
var condition = data.query.results.channel.item.condition;
console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.');
});
View yui-2in3-modal-panel-example.html
1 2 3 4 5 6 7 8 9 10
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>YUI 2in3 Modal Overlay Example</title>
</head>
View gist:389725
1 2 3 4 5 6 7 8 9 10
 
 
//
// This block of code creates the YDN Rack module that supports searching within
// a set of docs. Previously, the only search functionality would scour the entire
// site for the terms entered. This module aims to provide contextual search
// within documentation so a user can more easily find something related to the
// docs currently being presented. We use a bunch of y! technology to do the heavy
// lifting and that's awesome that we just have to manufacture the glue.
//
View simplePhpOpenid.php
1 2 3 4 5 6 7 8 9 10
<?php // simple code to require OpenID authentication on a page
/*
Requirements:
* PHP 5
* OpenID Enabled PHP library (http://openidenabled.com/php-openid/)
Usage:
1) Put this code in a file on your server
2) Edit the "$realm" variable to be your domain
Something went wrong with that request. Please try again.