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/placefinder'; | |
var params = qs.stringify({ | |
q: '701 First Ave, Sunnyvale, CA', | |
flags: 'J' | |
}); |
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
<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 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 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 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 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
class ViewController: UIViewController, FlurryAdNativeDelegate { | |
// For instance, the two most frequently used callbacks are: | |
func adNativeDidFetchAd(nativeAd: FlurryAdNative!){ | |
// The SDK returns this callback for every instance of the native ad fetched | |
// The FlurryAd object contains all of the ad assets | |
} | |
// Informational callback invoked when there is an ad error | |
func adNative(nativeAd: FlurryAdNative!, adError: FlurryAdError, errorDescription: NSError!){ |
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
let nativeAd = FlurryAdNative(space: "ADSPACE"); | |
nativeAd.adDelegate = self; | |
nativeAd.viewControllerForPresentation = self; | |
nativeAd.fetchAd(); | |
nativeAd.trackingView = self; |
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
if adInterstitial != nil && adInterstitial.ready { | |
adInterstitial.presentWithViewController(self); | |
} else { | |
adInterstitial.fetchAd(); | |
} |
OlderNewer