<?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>Timetric Blog &#187; api</title>
	<atom:link href="http://blog.timetric.com/category/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.timetric.com</link>
	<description></description>
	<lastBuildDate>Fri, 27 May 2011 12:29:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Inflation Stats, powered by Timetric Chartroom</title>
		<link>http://blog.timetric.com/2011/02/14/inflation-stats-powered-by-timetric-chartroom/</link>
		<comments>http://blog.timetric.com/2011/02/14/inflation-stats-powered-by-timetric-chartroom/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 10:48:32 +0000</pubDate>
		<dc:creator>Andrew Walkingshaw</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[chartroom]]></category>
		<category><![CDATA[inflation statistics]]></category>
		<category><![CDATA[inflationstats.com]]></category>
		<category><![CDATA[publishing]]></category>

		<guid isPermaLink="false">http://blog.timetric.com/?p=634</guid>
		<description><![CDATA[On Friday, we introduced Timetric Chartroom &#8212; automated statistics sections for websites. Here&#8217;s an example of what Timetric Chartroom can do: inflationstats.com, a dedicated site for the latest UK inflation statistics. Inflation Stats breaks down all the RPI and CPI &#8230; <a href="http://blog.timetric.com/2011/02/14/inflation-stats-powered-by-timetric-chartroom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>On Friday, we introduced Timetric Chartroom &mdash; <a href="http://timetric.com/products/publishers/chartroom/" target="_blank">automated statistics sections for websites</a>.</p>
<p>Here&#8217;s an example of what Timetric Chartroom can do: <a href="http://inflationstats.com" target="_blank">inflationstats.com</a>, a dedicated site for the latest <a href="http://inflationstats.com/" target="_blank">UK inflation</a> statistics. Inflation Stats breaks down all the <a href="http://inflationstats.com/" target="_blank">RPI and CPI</a> components, so you can see with a couple of clicks just which products or services are driving changes in the rate of inflation.</p>
<p>Here&#8217;s an example. As of right now, <a href="http://inflationstats.com/uk/cpi-all-items/transport/operation-of-personal-transport-equipment/fuels-and-lubricants/" target="_blank">fuel prices</a> are increasing by around 13% year-on-year, and fuel&#8217;s about 4% of the CPI basket (which, in total, is up 3.7% year-on-year at time of writing):</p>
<p><script src="http://media.timetric.com/js/min/embed.v1.js" type="text/javascript"></script><script type="text/javascript">new TMTRC.Widget({"axisPerSeries":false,"series":[{"url":"http://timetric.com/embed/zVYoEgHmSOO-yyr6s8M2ig/index/","color":"0xc8c8c8","fill":true},{"url":"http://timetric.com/embed/qO9qAf20TRCUGhECpbWXeg/index/","color":"0x48602c","fill":false}],"time":{"start":1199145600000,"end":null}},{height:350}).render_prefer_svg();</script></p>
<p>Because Inflation Stats is focussed around a single, easy-to-grasp subject, it&#8217;s really fast for anyone to find the graph they&#8217;re looking for. <a href="http://inflationstats.com/uk/page/about/" target="_blank">(Here&#8217;s the help page &mdash; have a look for yourself.</a>). And because it&#8217;s built on the Timetric API and shares data with <a href="http://timetric.com/" target="_blank">timetric.com</a>, it&#8217;s always up to date with the latest statistics.</p>
<p>We think the future of statistical reporting is sites like these. Why should the data live in a database only your journalists can see, particularly if it&#8217;s public? Make it public and let your readers grab and share the graphs too. Using <a href="http://timetric.com/products/publishers/chartroom/" target="_blank">Chartroom</a>, we can have similar sites built into your website within days or weeks, on almost any statistical subject. <a href="mailto:contact@timetric.com">Get in touch now</a> to learn more.</p>
<p>(And if you&#8217;d like to help build sites and services like these, <a href="http://timetric.com/about/jobs" target="_blank">we&#8217;re hiring</a>, and we&#8217;d love to hear from you too.)</p>
<div id="tweetbutton634" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fblog.timetric.com%2F2011%2F02%2F14%2Finflation-stats-powered-by-timetric-chartroom%2F&amp;via=timetric&amp;text=Inflation%20Stats%2C%20powered%20by%20Timetric%20Chartroom&amp;related=timetric&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fblog.timetric.com%2F2011%2F02%2F14%2Finflation-stats-powered-by-timetric-chartroom%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://blog.timetric.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.timetric.com/2011/02/14/inflation-stats-powered-by-timetric-chartroom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timetric Chartroom and Timetric Benchmark – and TISEE 2011, the cloud, and doing what you&#8217;re good at</title>
		<link>http://blog.timetric.com/2011/02/11/timetric-chartroom-and-timetric-benchmark-%e2%80%93%c2%a0and-tisee-2011-the-cloud-and-doing-what-youre-good-at/</link>
		<comments>http://blog.timetric.com/2011/02/11/timetric-chartroom-and-timetric-benchmark-%e2%80%93%c2%a0and-tisee-2011-the-cloud-and-doing-what-youre-good-at/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 19:00:22 +0000</pubDate>
		<dc:creator>Andrew Walkingshaw</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[chartroom]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[data as a service]]></category>
		<category><![CDATA[monetizing your data]]></category>
		<category><![CDATA[publishing]]></category>

		<guid isPermaLink="false">http://blog.timetric.com/?p=627</guid>
		<description><![CDATA[For all the talk about &#8220;gross national happiness&#8220;, studies keep showing that one of the biggest determining factors in how good you feel about the world is whether you get to do something you feel you&#8217;re good at. People like &#8230; <a href="http://blog.timetric.com/2011/02/11/timetric-chartroom-and-timetric-benchmark-%e2%80%93%c2%a0and-tisee-2011-the-cloud-and-doing-what-youre-good-at/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For all the talk about &#8220;<a href="http://byline.timetric.com/2011/02/06/happiness-statistics-not-good-for-my-well-being/">gross national happiness</a>&#8220;, studies keep showing that one of the biggest determining factors in how good you feel about the world is whether you get to do something you feel you&#8217;re good at. People like doing things they do well, and they find it easier to get started and to keep going.</p>
<p>The same thing&#8217;s true, more or less, for products and businesses. They get called &#8220;core competencies&#8221; or the like, but that&#8217;s what it means; businesses succeed when they concentrate on the things they do uniquely well. <a href="http://apple.com">Apple</a> design great end-to-end user experiences, <a href="http://www.genre.com/page">Gen Re</a> prices the likelihood of really unlikely events (and insures insurers against them), <a href="http://www.tesco.com/">Tesco</a> know exactly what store to put where and how best to stock it. Each of the businesses does that one thing, the key point where it ultimately creates value, tremendously well, and the more it focusses on that one thing, the better it tends to do.</p>
<p>As I type, I&#8217;m sitting in the back of a plane heading back to Heathrow from Sofia. I was at <a href="http://www.tisee2011.com/">TISEE 2011</a>, where I took part in a panel about cloud services. &#8220;Cloud&#8221;&#8216;s a bit of jargon which often means whatever you want it to, but I threw out this quote and one of the other panelists (Sean Park of Anthemis) promptly tweeted it:</p>
<p><!-- http://twitter.com/#!/anthemis/status/35645419794993152 --><br />
<style type='text/css'>.bbpBox35645419794993150 {background:url(http://a3.twimg.com/a/1296843226/images/themes/theme1/bg.png) #C0DEED;padding:20px;} p.bbpTweet{background:#fff;padding:10px 12px 10px 12px;margin:0;min-height:48px;color:#000;font-size:18px !important;line-height:22px;-moz-border-radius:5px;-webkit-border-radius:5px} p.bbpTweet span.metadata{display:block;width:100%;clear:both;margin-top:8px;padding-top:12px;height:40px;border-top:1px solid #fff;border-top:1px solid #e6e6e6} p.bbpTweet span.metadata span.author{line-height:19px} p.bbpTweet span.metadata span.author img{float:left;margin:0 7px 0 0px;width:38px;height:38px} p.bbpTweet a:hover{text-decoration:underline}p.bbpTweet span.timestamp{font-size:12px;display:block}</style>
<div class='bbpBox35645419794993150'>
<p class='bbpTweet'>&#8220;everything that can be turned into a service will be&#8221; @<a class="tweet-url username" href="http://twitter.com/covert" rel="nofollow">covert</a> <a href="http://twitter.com/search?q=%23Tisee" title="#Tisee" class="tweet-url hashtag" rel="nofollow">#Tisee</a><span class='timestamp'><a title='Thu Feb 10 10:25:04 +0000 2011' href='http://twitter.com/#!/anthemis/status/35645419794993152'>less than a minute ago</a> via <a href="http://twitter.com/" rel="nofollow">Twitter for iPhone</a></span><span class='metadata'><span class='author'><a href='http://twitter.com/anthemis'><img src='http://a1.twimg.com/profile_images/1237598177/Anthemis_Twitter_Logo.002_normal.jpg' /></a><strong><a href='http://twitter.com/anthemis'>Anthemis Group</a></strong><br/>anthemis</span></span></p>
</div>
<p> <!-- end of tweet --></p>
<p><a href="http://streamer.bg/en/210/filmpage.go">Video here</a> – fast forward to about 44:50. (I go off on one for about two solid minutes.)</p>
<p>That&#8217;s what the cloud trend is really about, I think. Every business does something really well, and a lot of the time, they can turn that skill into a platform other people can build on. Amazon&#8217;s <a href="http://timetric.com/dataset/amazon-web-services-aws-spot-price/">AWS</a> and <a href="http://www.amazon.co.uk/gp/help/customer/display.html?nodeId=3149101">Marketplace</a> — Amazon being a rare example of a business which is exceptional in a few fields — come out of two areas they had to excel in to make their core bookshop business work; running a heck of a lot of servers and doing online storefronts. They&#8217;ve essentially turned themselves into a group of businesses where each part of the group is supplied by another: the infrastructure team supply the wholesome team with reliable computing, storage and bandwidth, the storefront team supply the book selling operation with the software needed to let people buy the books, and the bookseller operation get to focus on stock, pricing, marketing and customer support. Everybody gets to do the thing they&#8217;re good at, so everyone&#8217;s happy.</p>
<p>That&#8217;s what the whole cloud thing means to me. Getting to focus on what you&#8217;re good at.</p>
<p>At Timetric, we&#8217;re good at <a href="http://timetric.com/dataset/">aggregating</a>, <a href="http://timetric.com/topic/">organising</a>, and building great visualisation and developer tools around statistics, and we&#8217;re good at understanding how data from different sources fits together. You&#8217;re good at understanding and explaining what these statistics mean to your readers or to your business. You deserve to get to focus on that: you shouldn&#8217;t have to be expert in navigating government websites or building data aggregation systems or crafting interactive graphs which look great and work in every browser. That&#8217;s our job.</p>
<p>Thanks to our platform, we can do our job, and by that, help you focus on yours. For journalists and the media, we have Timetric Chartroom: <a href="http://timetric.com/products/publishers/chartroom/">up-to-date, interactive statistics pages for your website on almost any topic you can think of</a>. It&#8217;s the best and latest data, automatically updated and ready for your readers in easy-to-use charts. For data-rich businesses, <a href="http://timetric.com/products/benchmark/">Timetric Benchmark</a>: we work with you to mine your underexploited databases and server logs for the trends which really affect your business, we contextualize it with public and proprietary data from our (extensive) library, and we help you securely share it with your colleagues and trusted partners or monetize it through services for the wider world.</p>
<p>This is the promise of the cloud: building great businesses and products by getting the best people and services involved, whether they&#8217;re inside your company or not. We all succeed and we all get happy. We&#8217;re looking forward to working with you.</p>
<div id="tweetbutton627" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fblog.timetric.com%2F2011%2F02%2F11%2Ftimetric-chartroom-and-timetric-benchmark-%25e2%2580%2593%25c2%25a0and-tisee-2011-the-cloud-and-doing-what-youre-good-at%2F&amp;via=timetric&amp;text=Timetric%20Chartroom%20and%20Timetric%20Benchmark%20%E2%80%93%C2%A0and%20TISEE%202011%2C%20the%20cloud%2C%20and%20doing%20what%20you%26%238217%3Bre...%20&amp;related=timetric&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fblog.timetric.com%2F2011%2F02%2F11%2Ftimetric-chartroom-and-timetric-benchmark-%25e2%2580%2593%25c2%25a0and-tisee-2011-the-cloud-and-doing-what-youre-good-at%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://blog.timetric.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.timetric.com/2011/02/11/timetric-chartroom-and-timetric-benchmark-%e2%80%93%c2%a0and-tisee-2011-the-cloud-and-doing-what-youre-good-at/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get up-to-date statistical graphs for your site</title>
		<link>http://blog.timetric.com/2010/08/24/get-up-to-date-statistical-graphs-for-your-site/</link>
		<comments>http://blog.timetric.com/2010/08/24/get-up-to-date-statistical-graphs-for-your-site/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 12:37:39 +0000</pubDate>
		<dc:creator>Andrew Walkingshaw</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[plotting]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://blog.timetric.com/?p=508</guid>
		<description><![CDATA[Firstly, hello to everyone at the data-driven journalism conference in the Netherlands today! We&#8217;ve been working on a few new things for Timetric, and one of them&#8217;s ready to go: we hope a lot of people, including journalists &#8212; and &#8230; <a href="http://blog.timetric.com/2010/08/24/get-up-to-date-statistical-graphs-for-your-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Firstly, hello to everyone at the <a href="http://datadrivenjournalism.net/">data-driven journalism</a> conference in the Netherlands today! We&#8217;ve been working on a few new things for Timetric, and one of them&#8217;s ready to go: we hope a lot of people, including journalists &mdash; and you! &mdash; find it useful.</p>
<h3>Get up-to-date graphs and data on your website in five minutes. Or your money back. <a href="#footnote_embed"><sup>*</sup></a></h3>
<p><strong>1. Find a subject you&#8217;re interested in.</strong></p>
<p>Timetric has over a million statistics from sources including the <a href="http://timetric.com/dataset/worldbank/">World Bank</a>, the European Union&#8217;s <a href="http://timetric.com/dataset/eurostat/">Eurostat</a>, the <a href="http://timetric.com/dataset/exchange_rates_forex_europe/">European Central Bank</a>, the <a href="http://timetric.com/dataset/st_louis_fed_fred/">St. Louis Fed</a>, the UK&#8217;s <a href="http://timetric.com/dataset/uk_national_statistics/">Office of National Statistics</a>, <a href="http://timetric.com/dataset/amazon-web-services-aws-spot-price/">Amazon</a>, and many others. We have quite a bit of data: around 1.1 million indicators at time of writing&#8230;</p>
<p>Start by;</p>
<ul>
<li>picking a subject you&#8217;re interested in from our <a href="http://timetric.com/topic">list of topics</a></li>
<li>looking at the data we&#8217;ve got from one of our <a href="http://timetric.com/dataset">sources</a>, or</li>
<li>doing a search from <a href="http://timetric.com/">our front page</a>.</li>
</ul>
<p>
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/QmcAxIJoiuc" frameborder="0"><br />
</iframe><br />
</p>
<p><strong>2. Pick the data you&#8217;re interested and add it to the graph.</strong></p>
<p>Filtering through the dataset is really easy: just search, then tick any data you want to see in the graph. Want to take it out again? Untick it.</p>
<p><iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/51Drjwe3W7g" frameborder="0"><br />
</iframe></p>
<p><strong>3. Tweak the graph and grab the embed code.</strong></p>
<p>Right now, you can change the size of the graph or the line thickness. (We&#8217;re adding more options here soon). Once you&#8217;ve finished tweaking, grab the embed code and paste it into your site or blog, just like you would with a Youtube movie.</p>
<p><iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/hwx8CkcvdsE" frameborder="0"><br />
</iframe></p>
<p><strong>4. Not done yet? Let us help.</strong></p>
<p>Email us at <a href="mailto:help@timetric.com">help@timetric.com</a>, <a href="http://twitter.com/timetric">catch us on Twitter</a>, or leave a comment! We&#8217;d be glad to help you out.</p>
<p><em id="footnote_embed">(*) timetric.com is free to use. Find us and we&#8217;ll buy you a drink, though.</em></p>
<div id="tweetbutton508" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fblog.timetric.com%2F2010%2F08%2F24%2Fget-up-to-date-statistical-graphs-for-your-site%2F&amp;via=timetric&amp;text=Get%20up-to-date%20statistical%20graphs%20for%20your%20site&amp;related=timetric&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fblog.timetric.com%2F2010%2F08%2F24%2Fget-up-to-date-statistical-graphs-for-your-site%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://blog.timetric.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.timetric.com/2010/08/24/get-up-to-date-statistical-graphs-for-your-site/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>API tokens for Timetric</title>
		<link>http://blog.timetric.com/2009/06/09/api-tokens-for-timetric/</link>
		<comments>http://blog.timetric.com/2009/06/09/api-tokens-for-timetric/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 18:37:06 +0000</pubDate>
		<dc:creator>Toby White</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[infrastructure]]></category>

		<guid isPermaLink="false">http://blog.timetric.com/?p=135</guid>
		<description><![CDATA[With the newest release of our API, we&#8217;ve launched a feature to make life easier for developers — API tokens. From the beginning, we&#8217;ve been focussed as much on the developer experience as the user experience, and so our API has been the &#8230; <a href="http://blog.timetric.com/2009/06/09/api-tokens-for-timetric/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With the newest release of our <a href="http://timetric.com/help/httpapi">API</a>, we&#8217;ve launched a feature to make life easier for developers — API tokens.</p>
<p>From the beginning, we&#8217;ve been focussed as much on the developer experience as the user experience, and so our API has been the focus of just as much <abbr title="tender loving care">TLC</abbr> as the website. One unavoidable issue in using any web API is dealing with authentication, and it&#8217;s especially hard to deal with it in a way that simultaneously satisfies</p>
<ul>
<li>security concerns</li>
<li>ease-of-use for the developer</li>
<li>ease-of-use for the end-user of any third-party apps.</li>
</ul>
<p>At launch, we supported <a href="http://oauth.net">OAuth</a>, which is a relatively new standard, designed for web services. It tries to solve all three of these problems, particularly with respect to letting end-users use third-party applications safely.</p>
<p>However, OAuth can be quite complex for developers to get started with. And in particular, if you&#8217;re just trying to write scripts to experiment with, for your own use, there&#8217;s an awful lot of hoops to jump through, even in understanding the <a href="http://oauth.net/core/diagram.png">basic OAuth workflow</a>.</p>
<p>We also allowed developers to fallback to using their username and password over <a href="http://tools.ietf.org/html/rfc2617">HTTP Basic Auth</a> — but with strong caveats around it. Using your login credentials for this sort of purpose is a very bad idea.</p>
<p>Basic Auth (over http, rather than https) has almost no security &#8211; it&#8217;s easy to sniff over insecure connections. And when using login credentials for anything except logging in through a web-browser, you have to leave your password lying around embedded in scripts, or give it to applications, either of which makes it prone to leakage, whether by accidental loss, or by deliberate attempts to steal.</p>
<p>Worse, you can&#8217;t revoke your login credentials easily; once someone has stolen them, the only way to prevent them being used is to change your password — and worse still even that that, since they are your primary login credentials, any attacker can change your password before you do, thus completely denying you access to your account.</p>
<p>So, we&#8217;ve made a new authentication scheme publically available. This is designed to be much easier for developers to get going with. Our API tokens still use Basic Auth — despite its drawbacks, it&#8217;s got two major advantages over OAuth</p>
<ul>
<li>it&#8217;s supported by almost every http library out there. Whatever your favourite programming language, chances are its http libraries do HTTP Basic already. (This even includes shell script &#8211; <a href="http://curl.haxx.se">curl</a> supports Basic Auth out of the box, see below!)
  </li>
<li>it involves a single set of credentials which are basically stateless; unlike OAuth you don&#8217;t have to worry about going through a dance to set up your tokens.</li>
</ul>
<p>Essentially, our API tokens can be used as replacement username/password combinations for certain, limited, operations. You can leave these embedded in scripts, or pass them to applications without fear of the consequences; they can&#8217;t be used to change your login password, and they are easily revoked if they do leak out.</p>
<p>Our help pages have proper documentation, both on how to <a href="http://timetric.com/help/external_applications/#granting-permission-with-api-toke">generate API tokens</a> and how to <a href="http://timetric.com/help/authentication/#api-tokens">use them</a>, but here&#8217;s a quick overview. To create an API token, you go to your <a href="http://timetric.com/settings/#apps">settings page</a>, where you&#8217;ll see this:</p>
<p><img src="http://blog.timetric.com/wp-content/uploads/2009/06/apitoken_before.png" alt="apitoken_before" title="apitoken_before" width="550" class="alignnone size-full wp-image-137" /></p>
<p>If you follow the &#8220;Create new&#8221; link, you&#8217;ll be prompted for a name for the API token (here, I&#8217;ll call it &#8220;shell script&#8221;, since I&#8217;m going to use it with a shell script). </p>
<p> <br />
<img src="http://blog.timetric.com/wp-content/uploads/2009/06/apitoken_name.png" alt="apitoken_name" title="apitoken_name" width="550" class="alignnone size-full wp-image-139" /></p>
<p>And after you&#8217;ve created it, the API token will appear in the list on the page.</p>
<p><img src="http://blog.timetric.com/wp-content/uploads/2009/06/apitoken_got.png" alt="apitoken_got" title="apitoken_got" width="550" class="alignnone size-full wp-image-138" /></p>
<p>As you can see, your API token consists of a Key and a Secret, to be used like a Username and Password. These can be used for authenticating with your http library.</p>
<p>If you&#8217;re using Python, we&#8217;d recommend <a href="http://code.google.com/p/httplib2/">httplib2</a>. (If you want to restrict yourself to using the Python standard library, see <a href="http://www.voidspace.org.uk/python/articles/authentication.shtml">this article</a>)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> httplib2
h = httplib2.<span style="color: black;">Http</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
h.<span style="color: black;">add_credentials</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'APITOKEN_KEY'</span>, <span style="color: #483d8b;">'APITOKEN_SECRET'</span><span style="color: black;">&#41;</span>
url = <span style="color: #483d8b;">&quot;https://timetric.com/series/pk6PiWcpTpimhozf0FTjmA/iso.csv&quot;</span>
resp, content = h.<span style="color: black;">request</span><span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span></pre></div></div>

<p> <br />
And in shell script you would do this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">curl http:<span style="color: #000000; font-weight: bold;">//</span>APITOKEN_KEY:APITOKEN_SECRET<span style="color: #000000; font-weight: bold;">@</span>timetric.com<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>To get you started, there&#8217;s a couple of libraries out there already for talking to timetric using the API tokens. You can use these directly, or as examples for your own scripts.</p>
<p><a href="http://jacobian.org">Jacob Kaplan-Moss</a> published his <a href="http://pypi.python.org/pypi/timetric">timetric library</a> sometime ago, using OAuth. We&#8217;ve adapted it to use API tokens as well; until our patches make their way upstream, you can use <a href="http://github.com/timetric/timetric/">our fork</a>.</p>
<p>I&#8217;ve been playing around with <a href="http://clojure.org">Clojure</a> recently, and my first project has been a library to retrieve data from timetric. You can see it <a href="http://github.com/tow/timetric-clojure">on github</a>, as another example of how to use the API tokens. (But probably not an example of how to write Clojure &#8211; any criticisms of my style are welcome, I&#8217;m only learning!)</p>
<p>But the great advantage of API tokens is that you don&#8217;t really need to go to the hassle of building a whole library or application to query a web service &#8211; sometimes all you want is a script. So here&#8217;s a shellscript which will poll timetric every 60 seconds for the latest value of a given timeseries (in this case, the <a href="http://timetric.com/series/pk6PiWcpTpimhozf0FTjmA/">Euro/Rupee exchange rate</a>).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">KEY</span>=<span style="color: #ff0000;">&quot;APITOKEN_KEY&quot;</span>
<span style="color: #007800;">SECRET</span>=<span style="color: #ff0000;">&quot;APITOKEN_SECRET&quot;</span>
<span style="color: #007800;">URL</span>=https:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #007800;">$KEY</span>:<span style="color: #007800;">$SECRET</span><span style="color: #000000; font-weight: bold;">@</span>timetric.com<span style="color: #000000; font-weight: bold;">/</span>series<span style="color: #000000; font-weight: bold;">/</span>pk6PiWcpTpimhozf0FTjmA<span style="color: #000000; font-weight: bold;">/</span>value<span style="color: #000000; font-weight: bold;">/</span>json<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #000000;">1</span>; <span style="color: #000000; font-weight: bold;">do</span>
  curl <span style="color: #007800;">$URL</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span>
  <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">60</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>We&#8217;ve found the ability to explore web-services from the command-line like this is invaluable in developing applications on top of them — we&#8217;ve been using these API tokens for some time internally, and we&#8217;re happy we can finally make them available to you.</p>
<p>I&#8217;ll be following this post up shortly with a couple of exciting things we&#8217;ve done in building services on Timetric with API tokens — we&#8217;re looking forward to seeing what the rest of the world does with them.</p>
<div id="tweetbutton135" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fblog.timetric.com%2F2009%2F06%2F09%2Fapi-tokens-for-timetric%2F&amp;via=timetric&amp;text=API%20tokens%20for%20Timetric&amp;related=timetric&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fblog.timetric.com%2F2009%2F06%2F09%2Fapi-tokens-for-timetric%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://blog.timetric.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.timetric.com/2009/06/09/api-tokens-for-timetric/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resolver One and Timetric</title>
		<link>http://blog.timetric.com/2009/05/15/resolver-one-and-timetric/</link>
		<comments>http://blog.timetric.com/2009/05/15/resolver-one-and-timetric/#comments</comments>
		<pubDate>Fri, 15 May 2009 16:33:54 +0000</pubDate>
		<dc:creator>Dan Wilson</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[resolverone]]></category>
		<category><![CDATA[spreadsheets]]></category>

		<guid isPermaLink="false">http://blog.timetric.com/?p=117</guid>
		<description><![CDATA[Our friends over at Resolver Systems in London have created a great demo where their spreadsheet software, Resolver One, acts as a client to Timetric. Resolver One is the coolest spreadsheet we&#8217;ve seen; it&#8217;s Python-powered from the ground up, so &#8230; <a href="http://blog.timetric.com/2009/05/15/resolver-one-and-timetric/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Our friends over at <a href="http://www.resolversystems.com/" target="_blank">Resolver Systems</a> in London have created a great demo where their spreadsheet software, <a href="http://www.resolversystems.com/products/" target="_blank">Resolver One</a>, acts as a client to Timetric. Resolver One is the coolest spreadsheet we&#8217;ve seen; it&#8217;s Python-powered from the ground up, so when you edit your cell values and formulae, you&#8217;re actually editing a Python script. Equally, though, you can head straight to the script-editing pane, and work from there and your changes will be reflected in the grid.</p>
<p style="text-align: left;">From inside your spreadsheet, you can now authenticate with your Timetric account, retrieve series and plot them, and search for series of interest:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-119" title="Resolver One/Timetric Search Results" src="http://blog.timetric.com/wp-content/uploads/2009/05/searchresults500.png" alt="Resolver One/Timetric Search Results" width="500" height="513" /></p>
<p style="text-align: left;">Clicking on &#8216;Fetch Series&#8217; brings the Timetric data into a new sheet where it can be viewed&#8230;</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-120" title="Timetric data in Resolver One" src="http://blog.timetric.com/wp-content/uploads/2009/05/data500.png" alt="Timetric data in Resolver One" width="500" height="439" /></p>
<p style="text-align: left;">&#8230; and plotted:</p>
<p style="text-align: center;"><img class="size-full wp-image-121 alignnone" title="Graph in Resolver One" src="http://blog.timetric.com/wp-content/uploads/2009/05/graph500.png" alt="Graph in Resolver One" width="500" height="439" /></p>
<p style="text-align: left;">This is a fantastic use for our <a href="http://timetric.com/help/httpapi/" target="_blank">API</a>, and great for people who want to use Timetric data offline in a spreadsheet.</p>
<p style="text-align: left;">Head over to their <a href="http://www.resolversystems.com/news/?p=112" target="_blank">site</a> to find out more!</p>
<div id="tweetbutton117" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fblog.timetric.com%2F2009%2F05%2F15%2Fresolver-one-and-timetric%2F&amp;via=timetric&amp;text=Resolver%20One%20and%20Timetric&amp;related=timetric&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fblog.timetric.com%2F2009%2F05%2F15%2Fresolver-one-and-timetric%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://blog.timetric.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.timetric.com/2009/05/15/resolver-one-and-timetric/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

