2010年10月19日火曜日

Google Books Search API : Data API - Reference -

■ Book Search feed types

 ● Search feed


http://books.google.com/books/feeds/volumes?
q=[KEYWORD]
&start-index=[NUM]
&max-results=[NUM]
&min-viewability=[noview|partial|full]


 ● Partner Co-Branded Search feed


http://books.google.com/books/feeds/p/PARTNER_COBRAND_ID/volumes?q=[KEYWORD]


 ● Single item feed


http://www.google.com/books/feeds/volumes/VOLUME_ID


 ● User library feed

認証あり (authentication token in the Authorization HTTP request header)

http://books.google.com/books/feeds/users/me/collections/library/volumes


認証なし

http://books.google.com/books/feeds/users/USER_ID/collections/library/volumes


 ● User annotation feed

認証あり (authentication token in the Authorization HTTP request header)

http://books.google.com/books/feeds/users/me/volumes


認証なし

http://books.google.com/books/feeds/users/USER_ID/volumes



■ HTTP response codes for Book Search Data API requests

CodeExplanation
200 OKNo error. The request to retrieve or update the resource, feed, or entity was successful.
201 CREATEDCreation of a resource was successful.
400 BAD REQUESTInvalid request URI or header, or unsupported nonstandard parameter.
401 UNAUTHORIZEDAuthorization required. This may occur when a request did not contain an Authorization header, when the format of the Authorization header was invalid, or that the authentication token supplied in the header was invalid. See the Authentication section of the developer's guide.
403 FORBIDDENUnsupported standard parameter, quota exceeded, or authentication or authorization failed.
404 NOT FOUNDResource (such as a feed or entry) not found.
500 INTERNAL SERVER ERRORInternal error. This is the default code that is used for all unrecognized errors.


■ Book Search elements reference

 - Atom elements reference

 ● atom:category

  <category> element : エントリの分類

  例

<category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/books/2008#volume"/>
<category scheme="http://schemas.google.com/books/2008/labels" term="ForLydia"/>



 ● atom:link

  レビュー、サムネイル画像、プレビュー URL、検索結果ページなどへのリンク

  例

<link rel="http://schemas.google.com/books/2008/thumbnail" type="image/jpeg"
href="http://bks3.books.google.com/books?id=o9dyGQAACAAJ&printsec=frontcover&img=1&zoom=5&sig=ACfU3U2sYY4y7XFmHKMYvISqfVGKwdN93w&source=gbs_gdata"/>
<link rel="http://schemas.google.com/books/2008/info" type="text/html"
href="http://books.google.com/books?id=o9dyGQAACAAJ&dq=pride+and+prejudice&ie=ISO-8859-1&source=gbs_gdata"/>
<link rel="http://schemas.google.com/books/2008/preview" type="text/html"
href="http://books.google.com/books?id=o9dyGQAACAAJ&dq=pride+and+prejudice&ie=ISO-8859-1&source=gbs_gdata"/>
<link rel="alternate" type="text/html"
href="http://books.google.com/books?id=o9dyGQAACAAJ&dq=pride+and+prejudice&ie=ISO-8859-1"/>
<link rel="self" type="application/atom+xml"
href="http://www.google.com/books/feeds/volumes/o9dyGQAACAAJ"/>



 - Dublin Core elements reference

 ● dc:creator

  著者、訳者など

  例

<dc:creator>Jane Austen</dc:creator>


 ● dc:date

  出版日

  例

<dc:date>1813-01-28</dc:date>


 ● dc:description

  説明

  例

<dc:description>Austen's comedy of manners--one of the most popular novels
of all time--features splendidly civilized sparring between the proud Mr...</dc:description>


 ● dc:format

  ページ数

  例

<dc:format>95 pages</dc:format>


 ● dc:identifier

  特定の本への明白なリファレンス
  ・各 <entry> に少なくとも1つ含まれる
  ・最初の identifier は Books Search でユニーク
   (例 s1gVAAAAYAAJ)
  ・2番目以降の identifier は外部の識別子 (ISBN, ISSN,
   Library of Congress Control Numbers (LCCNs),
   OCLC numbers) これらには prefix ("ISBN:" など) がつく

  例

<dc:identifier>qCkfAAAACAAJ</dc:identifier>
<dc:identifier>ISBN:0582780934</dc:identifier>


 ● dc:publisher

  出版社

  例

<dc:publisher>T. Egerton of the Whitehall Military Library</dc:publisher>


 ● dc:subject

  主題。topic of the book

  例

<dc:subject>Fiction</dc:subject>


 ● dc:title

  タイトル

  例

<dc:title>Pride and Prejudice</dc:title>
<dc:title>A Novel</dc:title>



 - Book Search custom elements reference

 ● gbs:viewability

  中身がどの程度みれるか

  例

<gbs:viewability value="http://schemas.google.com/books/2008#view_all_pages"/>


 ● gbs:embeddability

  どの程度 embed できるか

  例

<gbs:embeddability value="http://schemas.google.com/books/2008#embeddable"/>


 ● gbs:review

  レビュー

  例

<gbs:review type="text" xml:lang="en">A great beach read!</gbs:review>

0 件のコメント:

コメントを投稿

'},ClipboardSwf:null,Version:'1.5.1'}};dp.SyntaxHighlighter=dp.sh;dp.sh.Toolbar.Commands={ExpandSource:{label:'+ expand source',check:function(highlighter){return highlighter.collapse;},func:function(sender,highlighter) {sender.parentNode.removeChild(sender);highlighter.div.className=highlighter.div.className.replace('collapsed','');}},ViewSource:{label:'view plain',func:function(sender,highlighter) {var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/'+code+'');wnd.document.close();}},CopyToClipboard:{label:'copy to clipboard',check:function(){return window.clipboardData!=null||dp.sh.ClipboardSwf!=null;},func:function(sender,highlighter) {var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');if(window.clipboardData) {window.clipboardData.setData('text',code);} else if(dp.sh.ClipboardSwf!=null) {var flashcopier=highlighter.flashCopier;if(flashcopier==null) {flashcopier=document.createElement('div');highlighter.flashCopier=flashcopier;highlighter.div.appendChild(flashcopier);} flashcopier.innerHTML='';} alert('The code is in your clipboard now');}},PrintSource:{label:'print',func:function(sender,highlighter) {var iframe=document.createElement('IFRAME');var doc=null;iframe.style.cssText='position:absolute;width:0px;height:0px;left:-500px;top:-500px;';document.body.appendChild(iframe);doc=iframe.contentWindow.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write('

'+highlighter.div.innerHTML+'

');doc.close();iframe.contentWindow.focus();iframe.contentWindow.print();alert('Printing...');document.body.removeChild(iframe);}},About:{label:'?',func:function(highlighter) {var wnd=window.open('','_blank','dialog,width=300,height=150,scrollbars=0');var doc=wnd.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write(dp.sh.Strings.AboutDialog.replace('{V}',dp.sh.Version));doc.close();wnd.focus();}}};dp.sh.Toolbar.Create=function(highlighter) {var div=document.createElement('DIV');div.className='tools';for(var name in dp.sh.Toolbar.Commands) {var cmd=dp.sh.Toolbar.Commands[name];if(cmd.check!=null&&!cmd.check(highlighter)) continue;div.innerHTML+=''+cmd.label+'';} return div;} dp.sh.Toolbar.Command=function(name,sender) {var n=sender;while(n!=null&&n.className.indexOf('dp-highlighter')==-1) n=n.parentNode;if(n!=null) dp.sh.Toolbar.Commands[name].func(sender,n.highlighter);} dp.sh.Utils.CopyStyles=function(destDoc,sourceDoc) {var links=sourceDoc.getElementsByTagName('link');for(var i=0;i');} dp.sh.Utils.FixForBlogger=function(str) {return(dp.sh.isBloggerMode==true)?str.replace(/
|<br\s*\/?>/gi,''):str;} dp.sh.RegexLib={MultiLineCComments:new RegExp('/\\*[\\s\\S]*?\\*/','gm'),SingleLineCComments:new RegExp('//.*$','gm'),SingleLinePerlComments:new RegExp('#.*$','gm'),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"','g'),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'",'g')};dp.sh.Match=function(value,index,css) {this.value=value;this.index=index;this.length=value.length;this.css=css;} dp.sh.Highlighter=function() {this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true;} dp.sh.Highlighter.SortCallback=function(m1,m2) {if(m1.indexm2.index) return 1;else {if(m1.lengthm2.length) return 1;} return 0;} dp.sh.Highlighter.prototype.CreateElement=function(name) {var result=document.createElement(name);result.highlighter=this;return result;} dp.sh.Highlighter.prototype.GetMatches=function(regex,css) {var index=0;var match=null;while((match=regex.exec(this.code))!=null) this.matches[this.matches.length]=new dp.sh.Match(match[0],match.index,css);} dp.sh.Highlighter.prototype.AddBit=function(str,css) {if(str==null||str.length==0) return;var span=this.CreateElement('SPAN');str=str.replace(/ /g,' ');str=str.replace(/');if(css!=null) {if((/br/gi).test(str)) {var lines=str.split(' 
');for(var i=0;ic.index)&&(match.index/gi,'\n');var lines=html.split('\n');if(this.addControls==true) this.bar.appendChild(dp.sh.Toolbar.Create(this));if(this.showColumns) {var div=this.CreateElement('div');var columns=this.CreateElement('div');var showEvery=10;var i=1;while(i<=150) {if(i%showEvery==0) {div.innerHTML+=i;i+=(i+'').length;} else {div.innerHTML+='·';i++;}} columns.className='columns';columns.appendChild(div);this.bar.appendChild(columns);} for(var i=0,lineIndex=this.firstLine;i0;i++) {if(Trim(lines[i]).length==0) continue;var matches=regex.exec(lines[i]);if(matches!=null&&matches.length>0) min=Math.min(matches[0].length,min);} if(min>0) for(var i=0;i

Blogger Syntax Highliter

Version: {V}

http://www.dreamprojections.com/syntaxhighlighter

©2004-2007 Alex Gorbatchev.

'},ClipboardSwf:null,Version:'1.5.1'}};dp.SyntaxHighlighter=dp.sh;dp.sh.Toolbar.Commands={ExpandSource:{label:'+ expand source',check:function(highlighter){return highlighter.collapse;},func:function(sender,highlighter) {sender.parentNode.removeChild(sender);highlighter.div.className=highlighter.div.className.replace('collapsed','');}},ViewSource:{label:'view plain',func:function(sender,highlighter) {var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/'+code+'');wnd.document.close();}},CopyToClipboard:{label:'copy to clipboard',check:function(){return window.clipboardData!=null||dp.sh.ClipboardSwf!=null;},func:function(sender,highlighter) {var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');if(window.clipboardData) {window.clipboardData.setData('text',code);} else if(dp.sh.ClipboardSwf!=null) {var flashcopier=highlighter.flashCopier;if(flashcopier==null) {flashcopier=document.createElement('div');highlighter.flashCopier=flashcopier;highlighter.div.appendChild(flashcopier);} flashcopier.innerHTML='';} alert('The code is in your clipboard now');}},PrintSource:{label:'print',func:function(sender,highlighter) {var iframe=document.createElement('IFRAME');var doc=null;iframe.style.cssText='position:absolute;width:0px;height:0px;left:-500px;top:-500px;';document.body.appendChild(iframe);doc=iframe.contentWindow.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write('

'+highlighter.div.innerHTML+'

');doc.close();iframe.contentWindow.focus();iframe.contentWindow.print();alert('Printing...');document.body.removeChild(iframe);}},About:{label:'?',func:function(highlighter) {var wnd=window.open('','_blank','dialog,width=300,height=150,scrollbars=0');var doc=wnd.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write(dp.sh.Strings.AboutDialog.replace('{V}',dp.sh.Version));doc.close();wnd.focus();}}};dp.sh.Toolbar.Create=function(highlighter) {var div=document.createElement('DIV');div.className='tools';for(var name in dp.sh.Toolbar.Commands) {var cmd=dp.sh.Toolbar.Commands[name];if(cmd.check!=null&&!cmd.check(highlighter)) continue;div.innerHTML+=''+cmd.label+'';} return div;} dp.sh.Toolbar.Command=function(name,sender) {var n=sender;while(n!=null&&n.className.indexOf('dp-highlighter')==-1) n=n.parentNode;if(n!=null) dp.sh.Toolbar.Commands[name].func(sender,n.highlighter);} dp.sh.Utils.CopyStyles=function(destDoc,sourceDoc) {var links=sourceDoc.getElementsByTagName('link');for(var i=0;i');} dp.sh.Utils.FixForBlogger=function(str) {return(dp.sh.isBloggerMode==true)?str.replace(/
|<br\s*\/?>/gi,'\n'):str;} dp.sh.RegexLib={MultiLineCComments:new RegExp('/\\*[\\s\\S]*?\\*/','gm'),SingleLineCComments:new RegExp('//.*$','gm'),SingleLinePerlComments:new RegExp('#.*$','gm'),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"','g'),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'",'g')};dp.sh.Match=function(value,index,css) {this.value=value;this.index=index;this.length=value.length;this.css=css;} dp.sh.Highlighter=function() {this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true;} dp.sh.Highlighter.SortCallback=function(m1,m2) {if(m1.indexm2.index) return 1;else {if(m1.lengthm2.length) return 1;} return 0;} dp.sh.Highlighter.prototype.CreateElement=function(name) {var result=document.createElement(name);result.highlighter=this;return result;} dp.sh.Highlighter.prototype.GetMatches=function(regex,css) {var index=0;var match=null;while((match=regex.exec(this.code))!=null) this.matches[this.matches.length]=new dp.sh.Match(match[0],match.index,css);} dp.sh.Highlighter.prototype.AddBit=function(str,css) {if(str==null||str.length==0) return;var span=this.CreateElement('SPAN');str=str.replace(/ /g,' ');str=str.replace(/');if(css!=null) {if((/br/gi).test(str)) {var lines=str.split(' 
');for(var i=0;ic.index)&&(match.index/gi,'\n');var lines=html.split('\n');if(this.addControls==true) this.bar.appendChild(dp.sh.Toolbar.Create(this));if(this.showColumns) {var div=this.CreateElement('div');var columns=this.CreateElement('div');var showEvery=10;var i=1;while(i<=150) {if(i%showEvery==0) {div.innerHTML+=i;i+=(i+'').length;} else {div.innerHTML+='·';i++;}} columns.className='columns';columns.appendChild(div);this.bar.appendChild(columns);} for(var i=0,lineIndex=this.firstLine;i0;i++) {if(Trim(lines[i]).length==0) continue;var matches=regex.exec(lines[i]);if(matches!=null&&matches.length>0) min=Math.min(matches[0].length,min);} if(min>0) for(var i=0;i

ページビューの合計