FOWA 09 - Open Strategy Applied
Upcoming SlideShare
Loading in...5
×
 

FOWA 09 - Open Strategy Applied

on

  • 2,941 views

Overview of Yahoo! Developer Network and how the Open Strategy benefits developers and the web. Quick YQL overview with code samples.

Overview of Yahoo! Developer Network and how the Open Strategy benefits developers and the web. Quick YQL overview with code samples.

Statistics

Views

Total Views
2,941
Views on SlideShare
2,926
Embed Views
15

Actions

Likes
4
Downloads
32
Comments
0

5 Embeds 15

http://www.linkedin.com 8
http://www.killerblog.com 3
http://www.slideshare.net 2
http://generalyear.corp.yahoo.com 1
http://ydn.corp.yahoo.com:8374 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

FOWA 09 - Open Strategy Applied FOWA 09 - Open Strategy Applied Presentation Transcript

  • Open Strategy :: Applied Dan Theurer – Yahoo! Developer Network FOWA, Miami
    • Yahoo Developer Network (YDN)
    • Open Source
    • Developer Tools
    • Data Services
    • Yahoo! Open Strategy (YOS)
    • YQL Code Samples
    Open Strategy :: Applied
    • YUI
    • Hadoop
    • Apache
    • PHP
    • Perl
    • MySQL
    YDN :: Open Source
    • YSlow
    • Pipes
    • Blueprint Mobile Widgets
    YDN :: Developer Tools
    • BOSS
    • Address Book
    • Flickr
    YDN :: Data Services
  • YOS :: Technology Stack
    • SQL-like syntax
    • Allows you to query (SELECT), filter (WHERE) and join (IN) data across WebServices.
    • Self Describing - SHOW, DESC table
    • Public / Private Data
    • Bindings for many YDN APIs
    • Can query external structured data (USE)
    • http://developer.yahoo.com/yql
    Yahoo! Query Language (YQL)
  • <query yahoo:count=&quot;46&quot; yahoo:created=&quot;2009-02-20T08:16:03Z&quot; yahoo:lang=&quot;en-US&quot; yahoo:updated=&quot;2009-02-20T08:16:03Z&quot; yahoo:uri=&quot;http://query.yahooapis.com/v1/yql?q=show+tables&quot;> <results> <table>atom</table> <table>csv</table> <table>feed</table> <table>flickr.photos.exif</table> <table>flickr.photos.info</table> <table>flickr.photos.interestingness</table> <table>flickr.photos.recent</table> <table>flickr.photos.search</table> <table>flickr.photos.sizes</table> <table>flickr.places</table> <table>flickr.places.info</table> <table>geo.places</table> <table>geo.places.ancestors</table> … </results> </query YQL :: SHOW tables
  • <query yahoo:count=&quot;1&quot; yahoo:created=&quot;2009-02-21T01:41:28Z&quot; yahoo:lang=&quot;en-US&quot; yahoo:updated=&quot;2009-02-21T01:41:28Z&quot; yahoo:uri=&quot;http://query.yahooapis.com/v1/yql?q=desc+flickr.photos.search&quot;> <results> <table name=&quot;flickr.photos.search”> <request> <select usesRemoteLimit=&quot;true”> <key name=&quot;machine_tags&quot; type=&quot;xs:string&quot;/> <key name=&quot;radius_units&quot; type=&quot;xs:string&quot;/> <key name=&quot;safe_search&quot; type=&quot;xs:string&quot;/> <key name=&quot;privacy_filter&quot; type=&quot;xs:string&quot;/> <key name=&quot;contacts&quot; type=&quot;xs:string&quot;/> <key name=&quot;tags&quot; type=&quot;xs:string&quot;/> <key name=&quot;place_id&quot; type=&quot;xs:string&quot;/> <key name=&quot;text&quot; type=&quot;xs:string&quot;/> … </select> </request> </table> </results> </query> YQL :: DESC flickr.photos.search
  • <query yahoo:count=&quot;6&quot; yahoo:created=&quot;2009-02-21T02:09:55Z&quot; yahoo:lang=&quot;en-US&quot; yahoo:updated=&quot;2009-02-21T02:09:55Z&quot; yahoo:uri=&quot;http://query.yahooapis.com/v1/yql?q=select+*+from+flickr.photos.search+where+user_id%3D%2228569531%40N00%22+and+text%3D%22jump%22+limit+6&quot;> <results> <photo farm=&quot;4&quot; id=&quot;3154107557&quot; isfamily=&quot;0&quot; isfriend=&quot;0&quot; ispublic=&quot;1&quot; owner=&quot;28569531@N00&quot; secret=&quot;6f22e677c3&quot; server=&quot;3101&quot; title=&quot;Jump - Fremont Older&quot;/> <photo farm=&quot;4&quot; id=&quot;2563123589&quot; isfamily=&quot;0&quot; isfriend=&quot;0&quot; ispublic=&quot;1&quot; owner=&quot;28569531@N00&quot; secret=&quot;7811c91934&quot; server=&quot;3087&quot; title=&quot;Jump&quot;/> <photo farm=&quot;3&quot; id=&quot;2159479534&quot; isfamily=&quot;0&quot; isfriend=&quot;0&quot; ispublic=&quot;1&quot; owner=&quot;28569531@N00&quot; secret=&quot;785e671cd4&quot; server=&quot;2080&quot; title=&quot;Hollywood - Jump - Dan&quot;/> <photo farm=&quot;3&quot; id=&quot;2066431773&quot; isfamily=&quot;0&quot; isfriend=&quot;0&quot; ispublic=&quot;1&quot; owner=&quot;28569531@N00&quot; secret=&quot;c61604d090&quot; server=&quot;2208&quot; title=&quot;JUMP!&quot;/> <photo farm=&quot;2&quot; id=&quot;1304849768&quot; isfamily=&quot;0&quot; isfriend=&quot;0&quot; ispublic=&quot;1&quot; owner=&quot;28569531@N00&quot; secret=&quot;7271c8f9b3&quot; server=&quot;1233&quot; title=&quot;Testing the suit&quot;/> <photo farm=&quot;2&quot; id=&quot;1178261094&quot; isfamily=&quot;0&quot; isfriend=&quot;0&quot; ispublic=&quot;1&quot; owner=&quot;28569531@N00&quot; secret=&quot;3dac28807f&quot; server=&quot;1241&quot; title=&quot;Jump, jump!&quot;/> </results> </query> YQL :: SELECT * FROM flickr.photos.search WHERE user_id=&quot;28569531@N00” AND text=&quot;jump” LIMIT 6
    • Download the SDK
      • http://developer.yahoo.com/social/sdk
    • Unzip yos_php_sdk-1.1
    • Get a Developer Key
      • http://developer.yahoo.com/dashboard
    • Start to write some code
    Developer Key / PHP SDK
  • <?php // Include the PHP SDK for YSP library. require_once(&quot;yosdk/lib/Yahoo.inc&quot;); // Define values for keys required for authorization define(CONSUMER_KEY,&quot;dj0yJmk9ZDNwaXdQSEZ…j&quot;); define(CONSUMER_SECRET,&quot;37fe717538e0598e6c70d4262…&quot;); // The YahooApplication class is used for two-legged authorization, which doesn't need user authorization. $two_legged_app = new YahooApplication(CONSUMER_KEY,CONSUMER_SECRET); // Create queries for Flickr $yql_request = 'select * from flickr.photos.search where user_id=&quot;28569531@N00&quot; and text=&quot;jump&quot; limit 6'; // Make the request $results = $two_legged_app->query($yql_request); $photos = $results->query->results->photo; // Build the output HTML foreach($photos as $k=>$v) { $imgs .= '<img src=&quot;http://farm' . $v->farm . '.static.flickr.com/' . $v->server . '/' . $v->id . '_' . $v->secret . '_m.jpg&quot; alt=&quot;Image' . $k . '&quot;/>' ; } echo &quot;<html><body>&quot; . $imgs . '</body></html>’; ?> YQL :: 2-legged OAuth – PHP SDK
  • YQL :: 2-legged OAuth – Result
  • <?php // Include the PHP SDK for YSP library. require_once(&quot;yosdk/lib/Yahoo.inc&quot;); // Define values for keys required for authorization define(CONSUMER_KEY,&quot;dj0yJmk9ZDNwaXd…j&quot;); define(CONSUMER_SECRET,&quot;37fe717538e0598e6…&quot;); $session=YahooSession::requireSession(CONSUMER_KEY,CONSUMER_SECRET); // Define YQL queries for the Social Directory APIs $query = &quot;SELECT * FROM social.connections WHERE owner_guid=me LIMIT 2&quot;; $result = $session->query($query); // Build the output HTML echo(&quot;<html><body><pre><h2>Connection Data</h2>&quot; ); var_dump($result) ; echo(&quot;</pre></body></html>&quot;); ?> YQL :: 3-legged OAuth – PHP SDK
  • YQL :: 3-legged OAuth – Result
  • Thank You [email_address]