http://yapcasia.org/2011/talk/48
This talk is created by OpenOffice on Ubuntu. Including fonts are a little bit funny. Thank you for your interestings.
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Evolution of API With Blogging
1. Evolution of API With Blogging YAPC::Asia Tokyo 2011 Takatsugu Shigeta YAPC::Asia Tokyo 2011 by Japan Perl Association is licensed under a Creative Commons Display - Non-Commercial 2.1 Japan License.
2. Before starting my talk... I deeply apologize for not realizing to write some code. I mentioned below in a description of my talk. “ I'll show you implementations of starman, Twiggy and TheSchwartz” But that didn't match my thoughts. I don't show you that in my talk.
3.
4. Yeah... That's NOT stateless. I think that API should be stateless as REST. That pattern is asynchronized. I couldn't use that pattern in API.
6. Evolution of API With Blogging YAPC::Asia Tokyo 2011 Takatsugu Shigeta YAPC::Asia Tokyo 2011 by Japan Perl Association is licensed under a Creative Commons Display - Non-Commercial 2.1 Japan License.
7. Takatsugu Shigeta comewalk Some icons from http://icondock.com/ google-api-perl-client A moderator of gearman/MogileFS/Perlbal mailing lists http://blog.comewalk.com
11. Contents 1 1983–1993 2 1994–2001 3 2001–2004 4 2004–present 5 References http://en.wikipedia.org/wiki/History_of_blogging History Of Blogging
12. 1994-2001 The term "weblog" was coined by Jorn Barger on 17 Dec 1997. The short form, "blog," was coined by Peter Merholz in April or May 1999. LiveJournal was launched in Mar 1999. Blogger was launched in Aug 1999. http://en.wikipedia.org/wiki/History_of_blogging
13. 2001-2004 Movable Type was released in Oct 2001. By 2001, blogging community increased rapidly. http://en.wikipedia.org/wiki/History_of_blogging
21. Sample use Data::Dumper; use Net::Trackback::Client; use Net::Trackback::Ping; my $ping = Net::Trackback::Ping->new({ ping_url => 'http://example.com/trackback/1234/5678', url => 'http://example.com/blog/2011/10/post-1.html', title => 'Yet Another Trackback Test', description => 'This trackback which is generated by Net::Trackback.', }); my $client = Net::Trackback::Client->new; my $msg = $client->send_ping($ping); say Dumper($msg);
22.
23. Sample use URI; use XML::Feed; my $uri = URI->new('http://example.com/rss.xml'); my $parser = XML::Feed->parse($uri); say $parser->as_xml;
24.
25.
26. Sample use Data::Dumper; use XML::Feed; my $uri = 'http://example.com'; my @urls = XML::Feed->find_feeds($uri); say Dumper(@urls);
27.
28. use URI; use XML::FOAF; my $uri = URI->new('http://example.com'); my $foaf = XML::FOAF->new($uri); say $foaf->person->nick; Sample
30. Sample use Data::Dumper; use WWW::Blog::Metadata; # seealso: perldoc WWW::Blog::Metadata use WWW::Blog::Metadata::RSD; My $uri = 'http://example.com'; my $meta = WWW::Blog::Metadata->extract_from_uri($uri); say Dumper($meta->feeds); say Dumper($meta->rsd_uri);
31. Mobile Link Discovery <link rel=" alternate " media=" handheld " type="application/xhtml+xml" href="http://example.com/mobile" /> WWW::Blog::Metadata::MobileLinkDiscovery http://www.sixapart.jp/docs/tech/mobile_link_discovery_en.html
32.
33. XMLRPC use Data::Dumper; use RPC::XML::Client; my $client = RPC::XML::Client->new('http://www.typepad.jp/t/api'); my $request = RPC::XML::request->new( 'mt.supportedMethods', ); my $response = $client->send_request($request); say Dumper($response);
34. XMLRPC use Data::Dumper; use XMLRPC::Lite; my @result = XMLRPC::Lite ->proxy('http://www.typepad.com/t/api') ->call('mt.supportedMethods') ->result; say Dumper(@result);
35. AtomPub use XML::Atom::Client; use XML::Atom::Entry; my $entry = XML::Atom::Entry->new; $entry->title('This entry is posted by Atom.'); $entry->content('Atom Atom Atom Atom'); my $api = XML::Atom::Client->new; $api->username('YourUserName'); $api->password('YourPassword'); my $PostURI = "http://example.com/atom/weblog/blog_id=YourBlogID"; my $EditURI = $api->createEntry($PostURI, $entry);
55. JSON XML is still used as structured data/representation like HTML But response of API is moving to JSON.
56. With Document Your service should provide API explorer with API documentation http://explorer.metacpan.org/ http://code.google.com/apis/explorer/ https://developer.foursquare.com/docs/explore.html
57. PATCH Method PATCH method allows us to apply partial modifications to a resource. RFC5789 PATCH Method for HTTP http://www.ietf.org/rfc/rfc5789.txt e.g.) http://developer.github.com/v3/#http-verbs
63. Think Data Portability These formats couldn't resolve to clone our data completely Movable Type Import/Export Format WordPress eXtended RSS Format Atom (Blogger) Import/Export
64. Import/Export Next Future? Camlistore is a way to store, sync, share, model and back up content http://camlistore.org/
69. google-api-perl-client Google APIs Client Library for Perl http://code.google.com/p/google-api-perl-client/ https://github.com/comewalk/google-api-perl-client/
70. use URI; use Google::API::Client; my $client = Google::API::Client->new; My $service = $client->build('urlshortener', 'v1'); # Create a shortened URL by inserting the URL into the url collection. my $body = { 'longUrl' => 'http://code.google.com/apis/urlshortener/', }; my $res = $service->url->insert(body => $body)->execute; say 'short url is' . $res->{'id'};
71. I WAS VERY VERY EXCITED! Joe Gregorio mentioned the module in his Google+ stream. Brad Fitzpatrick directly emailed me that he can help me the module by code review or something like that.
72. I'll keep updating the module. And, if you are a programmer, also you can write some code. Right?