This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flurry.setUserID("USER_ID"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Purpose: | |
This script creates an oauth access token for you, and then | |
allows you to use that token to publish an update (that | |
includes a thumbnail picture) w/ the Yahoo! Updates API | |
Prerequisites | |
* A server with PHP 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Use YQL to convert XML to JSON in your sleep --> | |
<!-- Introduced in YDN blog post: http://developer.yahoo.net/blog/archives/2010/03/yql_code_samples_yql_is_easy_to_use.html --> | |
<script src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js"></script> | |
<ul>UN Headlines:</ul> | |
<script> | |
var Y = new YUI(); | |
function handleResponse ( json ) { | |
var items = json.query.results.item; | |
for ( var i = 0; i < items.length; i++ ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // a super-stripped down 2-leg oauth server/client example | |
//http://oauth.net/code/ | |
//http://oauth.googlecode.com/svn/code/php/OAuth.php | |
require 'oauth.php'; | |
$key = 'key'; | |
$secret = 'secret'; | |
$consumer = new OAuthConsumer($key, $secret); | |
$sig_method = new OAuthSignatureMethod_HMAC_SHA1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
Flurry.startSession("YOUR_FLURRY_API_KEY"); | |
// Your code... | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
}); |
NewerOlder