<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>booktwo.org &#187; APIs</title>
	<atom:link href="http://booktwo.org/tag/apis/feed/" rel="self" type="application/rss+xml" />
	<link>http://booktwo.org</link>
	<description>The future of Literature</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:55:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bookcubes: Souvenirs of Digital Reading</title>
		<link>http://booktwo.org/notebook/bookcubes/</link>
		<comments>http://booktwo.org/notebook/bookcubes/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 09:14:54 +0000</pubDate>
		<dc:creator>James Bridle</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[bkkeepr]]></category>
		<category><![CDATA[Bookleteer]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[eBooks]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://booktwo.org/?p=1249</guid>
		<description><![CDATA[<p><em>I was recently asked by the good people at Proboscis to undertake <a href="http://bookleteer.com/blog/2010/04/bookleteer-virtual-residencies/">a virtual residency</a>, exploring their <a href="http://bookleteer.com/index.html">Bookleteer</a> suite of tools. Bookleteer is described as &#8220;a platform for public authoring and cultures of listening&#8212;creating and sharing knowledge, stories, ideas and information&#8221;, and also as a form of samizdat for the twentieth century. </em></p>
<p><em>I&#8217;ll be further exploring the Bookleteer API in a future post. The code for the experiments <a href="http://bookleteer.com/blog/2010/04/james-bridle-residency-part-1/">can be found on the Bookleteer blog</a>.</em></p>
<p><img src="http://farm3.static.flickr.com/2454/4478550079_a0754c9fe7.jpg" width="500" height="375" alt="Bookcubes" /></p>
<p>One of the subjects that came up in <a href="http://booktwo.org/notebook/mbsp-sxsw/">my thinking for SXSW</a>, and which I mentioned briefly, was the... <a href="http://booktwo.org/notebook/bookcubes/" class="read_more"><br /><br />Read the rest of this post &#8594;</a></p>]]></description>
			<content:encoded><![CDATA[<p><em>I was recently asked by the good people at Proboscis to undertake <a href="http://bookleteer.com/blog/2010/04/bookleteer-virtual-residencies/">a virtual residency</a>, exploring their <a href="http://bookleteer.com/index.html">Bookleteer</a> suite of tools. Bookleteer is described as &#8220;a platform for public authoring and cultures of listening&mdash;creating and sharing knowledge, stories, ideas and information&#8221;, and also as a form of samizdat for the twentieth century. </em></p>
<p><em>I&#8217;ll be further exploring the Bookleteer API in a future post. The code for the experiments <a href="http://bookleteer.com/blog/2010/04/james-bridle-residency-part-1/">can be found on the Bookleteer blog</a>.</em></p>
<p><img src="http://farm3.static.flickr.com/2454/4478550079_a0754c9fe7.jpg" width="500" height="375" alt="Bookcubes" /></p>
<p>One of the subjects that came up in <a href="http://booktwo.org/notebook/mbsp-sxsw/">my thinking for SXSW</a>, and which I mentioned briefly, was the question of souvenirs. I said then that I don&#8217;t think digital does souvenirs&mdash;I can&#8217;t think of examples of what I consider to be real souvenirs which are not discrete and tangible. And as more of our activity takes place in the realm of the virtual and the digital, there&#8217;s a growing disparity between our experience, and our records of that experience.</p>
<p>These records&mdash;souvenirs&mdash;are important because they serve as touchstones, aides memoires, and visual quantifiers. They remind us of where we&#8217;ve been, keep experiences in our minds, enable us to learn from them through reinforcement. </p>
<p>Russell Davies has written about &#8220;the way we use these little objects to say stuff about ourselves. And, in saying those things, to understand ourselves.&#8221; And <a href="http://russelldavies.typepad.com/planning/2009/10/blocks-of-time-and-the-mechanical-facebook.html">in response to a brief on that topic he set last year</a> to the Interaction Design students at the AHO Institute of Design, Svein Inge Bjørkhaug came up with a system of physical blocks that represent your activity online:</p>
<p><img src="http://booktwo.org/wp-content/uploads/2010/03/souvenirs.jpg" alt="" title="souvenirs" width="500" height="331" class="alignnone size-full wp-image-1250" />[Photo by <a href="http://www.flickr.com/photos/cheesypeas/3971271439/in/pool-ahointeraction">jørngeorg</a> on Flickr]</p>
<p>Your computer activity is monitored and every week you&#8217;re sent a little collection of these blocks. Quite soon, this becomes a very real representation of a virtual activity, and a set of objects to be reckoned with.</p>
<p>I was reminded of this project when thinking through <a href="http://booktwo.org/notebook/mbsp-sxsw/">my previous assertion</a> that books are souvenirs of themselves. When people complain that they don&#8217;t want to read ebooks, I think a lot of this is due not to the reading experience itself&mdash;as everyone discovers eventually, the format disappears when you get stuck into a good story&mdash;but due to the other affordances the book offers.</p>
<p>Because the life of a traditional book is not just in the reading of it. It&#8217;s more like this:</p>
<p><img src="http://farm5.static.flickr.com/4063/4478784329_d6d0f7a584.jpg" width="500" height="308" alt="photo" /></p>
<p>And there&#8217;s a cognitive dissonance going on with ebooks, that they don&#8217;t fulfill those other cases, as well as the general problem of the tracelessness of electronic reading.</p>
<p>There&#8217;s another intersection here as well: the social timeline of the book&mdash;the reviews you read before you buy it and the conversations you have with your friends about it and so on. This line crosses the one above at the point of reading&mdash;which is also where <a href="http://bkkeepr.com">Bkkeepr</a> sits.</p>
<p>So it seemed natural to use Bkkeepr as the platform for experimenting with Bookleteer&#8217;s API, which allows automated access to its <a href="http://diffusion.org.uk/">Diffusion eBook</a> and <a href="http://proboscis.org.uk/projects/storycubes/">Storycube</a> generators.</p>
<p>For a while I&#8217;ve been meaning to add the ability to auto-generate inserts (or perhaps <a href="http://uk.moo.com/en/products/stickers.php">Moo stickers</a>) that put your bkkeepr data back into the real world, and into your books once you&#8217;ve finished them:</p>
<p><img src="http://farm5.static.flickr.com/4051/4479449494_1a9f12aa74.jpg" width="500" height="303" alt="bkkeepr instantiation" /></p>
<p>Bkkeepr is intended to eventually (cough) evolve into a scrobbling-type service not just for the books you read, but for the ebooks you read too. And it makes sense that Bkkeepr should therefore supply you with the souvenirs of this experience too:</p>
<p><img src="http://farm5.static.flickr.com/4001/4479176742_5d2f08916e.jpg" width="500" height="375" alt="Bookcubes" /></p>
<p>These cubes are auto-generated from Bkkeepr data using the Bookleteer Storycube API, currently in private beta. The Storycube API takes a set of images and returns a net in pdf format (there are more <a href="http://www.flickr.com/photos/stml/sets/72157623616763533/">pictures of the cubes and the process at Flickr</a>):</p>
<p><img src="http://farm5.static.flickr.com/4042/4479172426_051a1e84e1.jpg" width="500" height="375" alt="Bookcubes" /></p>
<p>They represent a couple of months reading, and while I own physical copies of these titles, the intention is to stand for the ebooks I also consume, but which leave no physical trace on my shelves, and thus too easily slip from memory:</p>
<p><img src="http://farm5.static.flickr.com/4041/4479210742_985ab88fd7.jpg" width="500" height="375" alt="Bookcubes" /></p>
<p><img src="http://farm3.static.flickr.com/2718/4479212800_06a38075ae.jpg" width="500" height="375" alt="Bookcubes" /></p>
<p>You can see how an avid ebook reader would quickly amass sets of these, which could line up along shelves vacated by the absence of physical books. </p>
<p>I like the bookcubes very much as physical instantiations of a virtual activity. However, as avatars for ebooks, they do strike me as a bit <em>obvious</em> (as well as fiddly). I think it&#8217;s probably possible to do better. </p>
<p>Other examples of physical souvenirs, alongside Svein Inge Bjørkhaug&#8217;s above, include the <a href="http://gadgets.boingboing.net/2009/03/16/the-sound-advice-pro.html">Sound Advice project</a>, or RIG&#8217;s <a href="http://russelldavies.typepad.com/planning/2010/01/data-decs.html">datadecs</a>. These seem more abstract and less representational than getting stuck in the same book jacket trap all over again. (It still bothers me that we use book covers as the main symbol for books bought online, and even for ebooks.)</p>
<p>I noticed in <a href="http://www.apple.com/ipad/guided-tours/">Apple&#8217;s iBooks demo</a> that there&#8217;s a progress bar on every page of the book:</p>
<p><img src="http://booktwo.org/wp-content/uploads/2010/04/ipad-progress.jpg" alt="" title="ipad-progress" width="500" height="250" class="alignnone size-full wp-image-1258" /></p>
<p>Which is good and something I&#8217;ve argued for for a while (it&#8217;s quite prominent in <a href="http://www.enhanced-editions.com/">Enhanced Editions</a>) because a sense of progress is important when you&#8217;re reading a long-form piece. And perhaps this approach is applicable to a couple of other bookish problems: how do you represent the book when it doesn&#8217;t have a cover and is no longer an advert for itself, and how do you make the invisible value of a book &#8211; the time spent on it by writers and editors &#8211; visible and thus communicate that value?</p>
<p><img src="http://farm5.static.flickr.com/4031/4480832945_7de79d99f7.jpg" width="500" height="307" alt="Metadata" /></p>
<p>Can we include metadata about the creation of the book into the book itself? (And while I&#8217;m showing and thinking with paper books and pencils here, I&#8217;m talking about ebooks.) Could the book contain the details of how long the author spent working on it, even embed its own, dated changelog?</p>
<p>And we&#8217;re getting into the realms of data visualisation here too, like Stefanie Posavec&#8217;s <a href="http://www.itsbeenreal.co.uk/index.php?/wwwords/literary-organism/">visualisations of <em>On The Road</em></a>: could we use representations not only of the text, but also of the author&#8217;s energy, to sell the book&mdash;representations which evolve further and merge with the experience of the reader to create souvenirs? Digital abstraction and re-instantiation beats tired physical nostalgia.</p>
<p>That is what I have been thinking about lately. Many thanks to <a href="http://bookleteer.com/">Bookleteer</a> for providing me with the tools to do so. I&#8217;ll be exploring their <a href="http://diffusion.org.uk/?page_id=2#ebook">Diffusion eBooks</a> next.</p>
]]></content:encoded>
			<wfw:commentRss>http://booktwo.org/notebook/bookcubes/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Amazon API Changes, Bookdata, PHP (Sorry)</title>
		<link>http://booktwo.org/notebook/amazon-api-changes-php/</link>
		<comments>http://booktwo.org/notebook/amazon-api-changes-php/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 15:52:02 +0000</pubDate>
		<dc:creator>James Bridle</dc:creator>
				<category><![CDATA[Amazon]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[bkkeepr]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://booktwo.org/?p=892</guid>
		<description><![CDATA[<p><strong>Warning:</strong> deeply dull post ahead. But, we&#8217;ve had a lot of discussion about bookdata, APIs, and Amazon on this blog, so it would be remiss of me not to post this.</p>
<p>From August 15th, Amazon requires all API requests to be signed, which to the layman means that you need to add a timestamp, and a &#8216;signature&#8217;, which is a <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function">hash</a> of the entire request, and your private Amazon key. </p>
<p>There are a bunch of PHP examples for doing this on the web, but because I had to tweak them all slightly to get them to work, I... <a href="http://booktwo.org/notebook/amazon-api-changes-php/" class="read_more"><br /><br />Read the rest of this post &#8594;</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Warning:</strong> deeply dull post ahead. But, we&#8217;ve had a lot of discussion about bookdata, APIs, and Amazon on this blog, so it would be remiss of me not to post this.</p>
<p>From August 15th, Amazon requires all API requests to be signed, which to the layman means that you need to add a timestamp, and a &#8216;signature&#8217;, which is a <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function">hash</a> of the entire request, and your private Amazon key. </p>
<p>There are a bunch of PHP examples for doing this on the web, but because I had to tweak them all slightly to get them to work, I thought I&#8217;d put it out there to be helpful &#8211; I&#8217;ve just implemented this on <a href="http://bkkeepr.com">bkkeepr</a> and <a href="http://bookseer.com">Bookseer</a> and a few other places&#8230; </p>
<p><code><span style="color: #f00">&lt;?php</span></code></p>
<p><code><span style="color: #060">// Build your request string, e.g.</span><br />
$request = 'Service=AWSECommerceService&#038;'.'AWSAccessKeyId=<strong>[YOUR AWS ACCESS KEY]</strong>&#038;'.'Timestamp='.gmdate("Y-m-d\TH:i:s\Z").'&#038;Operation=ItemSearch&#038;Title='.$title.'&#038;SearchIndex=Books';</code></p>
<p><code><span style="color: #060">// Encode and sort the request string</span><br />
$request = str_replace(',','%2C', $request);<br />
$request = str_replace(':','%3A', $request);<br />
$reqarr = explode('&#038;',$request);<br />
sort($reqarr);<br />
$string_to_sign = implode("&#038;", $reqarr);</code></p>
<p><code><span style="color: #060">// Append endpoint</span><br />
$string_to_sign = "GET\necs.amazonaws.co.uk\n/onca/xml\n".$string_to_sign;</code></p>
<p><code><span style="color: #060">// Create signature hash</span><br />
$signature = urlencode(base64_encode(hash_hmac("sha256", $string_to_sign, '<strong>[YOUR AWS PRIVATE KEY]</strong>', True)));</code></p>
<p><code><span style="color: #060">// Append signature to original request</span><br />
$request .= '&#038;Signature='.$signature;</code></p>
<p><code><span style="color: #060">// Append endpoint to original request</span><br />
$request = 'http://ecs.amazonaws.co.uk/onca/xml?'.$request;</code></p>
<p><code><span style="color: #060">// Make request</span><br />
Append signature to original request<br />
$curl_handle = curl_init();<br />
curl_setopt($curl_handle, CURLOPT_URL, $request);<br />
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);<br />
$book_data = curl_exec($curl_handle);<br />
curl_close($curl_handle);<br />
return $book_data;<br />
<span style="color: #f00">?&gt;</span></code></p>
<p>It&#8217;s actually pretty simple when you get your head round it, although Amazon has done an atrocious job of helping people make the change. You need to be quite the developer &#8211; or, in my case, read piles of unhelpful documentation and a hell of a lot of helpful blogs &#8211; to get your head round it, but I hope that helps someone.</p>
<p>Remember, you can make your own changes to the $request string in the example above &#8211; don&#8217;t forget the Timestamp, it&#8217;s important &#8211; and change the endpoint from .co.uk to .com, .fr etc. There&#8217;s also a slightly helpful <a href="http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html">Amazon helper here</a>.</p>
<p>If anyone has questions, I&#8217;ll try to help &#8211; but not promising anything&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://booktwo.org/notebook/amazon-api-changes-php/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

