<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6582755330738983902</id><updated>2011-11-28T08:17:10.260+09:00</updated><title type='text'>yusukebe blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://yusukebe.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6582755330738983902/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://yusukebe.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>yusukebe</name><uri>http://www.blogger.com/profile/07852106422983686834</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_uf6Wz0BQmf4/SmPUkYZEbAI/AAAAAAAAAWo/9HGVP8kUjDM/s1600-R/profile.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6582755330738983902.post-8796628699714941699</id><published>2009-07-21T17:16:00.005+09:00</published><updated>2009-07-21T17:25:53.392+09:00</updated><title type='text'>Simple sample code of Google Ajax Search using jQuery</title><content type='html'>A same javascript code is written often. So, I paste simple a sample code at below. This JS code loads a JSONP of Google Ajax Search by jQuery and dumps titles to Firebug console.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;var apiUrl = 'http://ajax.googleapis.com/ajax/services/search/web?';&lt;br /&gt;&lt;br /&gt;function googleSearch ( q ) {&lt;br /&gt;  var jsonUrl = apiUrl + 'v=1.0&amp;amp;q=' + q + '&amp;amp;start=1&amp;amp;callback=?';&lt;br /&gt;  loadJson( jsonUrl );&lt;br /&gt;  function loadJson( url ){&lt;br /&gt;    $.getJSON( url, function( data ) {&lt;br /&gt;      if( data.responseData.cursor.estimatedResultCount &amp;gt; 0 ){&lt;br /&gt;        $.each(data.responseData.results, function(i, entry){&lt;br /&gt;          console.log(entry.title);&lt;br /&gt;        });&lt;br /&gt;      }&lt;br /&gt;    });&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6582755330738983902-8796628699714941699?l=yusukebe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yusukebe.blogspot.com/feeds/8796628699714941699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yusukebe.blogspot.com/2009/07/simple-sample-code-of-google-ajax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6582755330738983902/posts/default/8796628699714941699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6582755330738983902/posts/default/8796628699714941699'/><link rel='alternate' type='text/html' href='http://yusukebe.blogspot.com/2009/07/simple-sample-code-of-google-ajax.html' title='Simple sample code of Google Ajax Search using jQuery'/><author><name>yusukebe</name><uri>http://www.blogger.com/profile/07852106422983686834</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_uf6Wz0BQmf4/SmPUkYZEbAI/AAAAAAAAAWo/9HGVP8kUjDM/s1600-R/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6582755330738983902.post-4009774709642956610</id><published>2009-07-21T11:40:00.003+09:00</published><updated>2009-07-21T12:22:17.590+09:00</updated><title type='text'>Easy to access any WebService API using Perl</title><content type='html'>I'll introduce easy way to access and parse the any WebService API such as "Google API", "Flickr", "YouTube" etc. using my CPAN module "WebService::Simple".&lt;br /&gt;&lt;br /&gt;First, install WebService::Simple from CPAN. The latest version is &lt;a href="http://search.cpan.org/~yusukebe/WebService-Simple-0.16/"&gt;'0.16'&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Simple sample code is here:&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;use WebService::Simple;&lt;br /&gt;use Data::Dumper;&lt;br /&gt;&lt;br /&gt;my $flickr = WebService::Simple-&amp;gt;new(&lt;br /&gt;    base_url =&amp;gt; &amp;quot;http://api.flickr.com/services/rest/&amp;quot;,&lt;br /&gt;    param    =&amp;gt; { api_key =&amp;gt; &amp;quot;your_api_key&amp;quot;, }&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;my $response =&lt;br /&gt;  $flickr-&amp;gt;get( { method =&amp;gt; &amp;quot;flickr.photos.search&amp;quot;, text =&amp;gt; &amp;quot;cat&amp;quot; } );&lt;br /&gt;print Dumper $response-&amp;gt;parse_response;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This program access to Flickr API, call the search photos method, parse the response as hash reference, and dump the object by Data::Dumper.&lt;br /&gt;&lt;br /&gt;WebService::Simple helps us three things below.&lt;br /&gt;&lt;br /&gt;   1. Make the request url to API&lt;br /&gt;   2. Fetch the response from API includes contents ( XML, JSON etc. )&lt;br /&gt;   3. Parse the content to use ( by XML::Simple etc. )&lt;br /&gt;&lt;br /&gt;So, any WebServices could be manipulated.&lt;br /&gt;&lt;br /&gt;Let's see another sample code for searching YouTube videos.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;use WebService::Simple;&lt;br /&gt;use WebService::Simple::Parser::XML::Simple;&lt;br /&gt;use XML::Simple;&lt;br /&gt;&lt;br /&gt;my $keyword = shift || 'Michael Jackson';&lt;br /&gt;my $xs = XML::Simple-&amp;gt;new( KeyAttr =&amp;gt; [], ForceArray =&amp;gt; ['entry'] );&lt;br /&gt;my $service = WebService::Simple-&amp;gt;new(&lt;br /&gt;    base_url =&amp;gt; &amp;quot;http://gdata.youtube.com/feeds/api/videos&amp;quot;,&lt;br /&gt;    param    =&amp;gt; { v =&amp;gt; 2 },&lt;br /&gt;    response_parser =&amp;gt;&lt;br /&gt;      WebService::Simple::Parser::XML::Simple-&amp;gt;new( xs =&amp;gt; $xs ),&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;my $res = $service-&amp;gt;get( { 'q' =&amp;gt; $keyword, } );&lt;br /&gt;my $ref = $res-&amp;gt;parse_response();&lt;br /&gt;&lt;br /&gt;for my $entry ( @{ $ref-&amp;gt;{entry} } ) {&lt;br /&gt;    print $entry-&amp;gt;{link}-&amp;gt;[0]-&amp;gt;{href} . &amp;quot;\n&amp;quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;WebService::Simple make it easy to access WebService API. Use it if you interested in :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6582755330738983902-4009774709642956610?l=yusukebe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yusukebe.blogspot.com/feeds/4009774709642956610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yusukebe.blogspot.com/2009/07/easy-to-access-any-webservice-api-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6582755330738983902/posts/default/4009774709642956610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6582755330738983902/posts/default/4009774709642956610'/><link rel='alternate' type='text/html' href='http://yusukebe.blogspot.com/2009/07/easy-to-access-any-webservice-api-using.html' title='Easy to access any WebService API using Perl'/><author><name>yusukebe</name><uri>http://www.blogger.com/profile/07852106422983686834</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_uf6Wz0BQmf4/SmPUkYZEbAI/AAAAAAAAAWo/9HGVP8kUjDM/s1600-R/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6582755330738983902.post-3371587897283724380</id><published>2009-07-21T09:35:00.006+09:00</published><updated>2009-07-21T10:08:57.972+09:00</updated><title type='text'>First Post</title><content type='html'>"yusukebe blog" has been started now. I write some articles on my personal blog named "&lt;a href="http://yusukebe.com/"&gt;yusukebe nikki&lt;/a&gt;" in Japanese, but his blog is wrote by my poor English :-)&lt;br /&gt;&lt;br /&gt;My interest things are making web services or mashup sites, writing Perl code, and technology related of a linux server.&lt;br /&gt;&lt;br /&gt;So, in this blog I'll post entries about tips of these technologies.&lt;br /&gt;&lt;br /&gt;If you are interested, please subscribe the feed of "yusukebe blog"!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6582755330738983902-3371587897283724380?l=yusukebe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yusukebe.blogspot.com/feeds/3371587897283724380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yusukebe.blogspot.com/2009/07/first-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6582755330738983902/posts/default/3371587897283724380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6582755330738983902/posts/default/3371587897283724380'/><link rel='alternate' type='text/html' href='http://yusukebe.blogspot.com/2009/07/first-post.html' title='First Post'/><author><name>yusukebe</name><uri>http://www.blogger.com/profile/07852106422983686834</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_uf6Wz0BQmf4/SmPUkYZEbAI/AAAAAAAAAWo/9HGVP8kUjDM/s1600-R/profile.jpg'/></author><thr:total>0</thr:total></entry></feed>
