This file contains hidden or 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
<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> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
// AppDelegate.swift | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
// A basic Flurry Event | |
Flurry.logEvent("Started Application"); | |
// Your code... | |
return true; | |
} |
This file contains hidden or 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. | |
var err: NSError? | |
// Log an error | |
Flurry.logError("ERROR_ID", "MESSAGE", exception: err); | |
// Your code... | |
} |
This file contains hidden or 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
// ViewController.swift | |
class ViewController: UIViewController, FlurryAdInterstitialDelegate { | |
let adInterstitial = FlurryAdInterstitial(space: "ADSPACE"); | |
override func viewDidAppear(animated: Bool) { | |
super.viewDidAppear(animated); | |
adInterstitial.adDelegate = self; | |
adInterstitial.fetchAd(); | |
} | |
This file contains hidden or 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
if adInterstitial != nil && adInterstitial.ready { | |
adInterstitial.presentWithViewController(self); | |
} else { | |
adInterstitial.fetchAd(); | |
} |