<?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>I want to be free &#187; api</title>
	<atom:link href="http://i1t2b3.com/category/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://i1t2b3.com</link>
	<description>Any fool can make things bigger and more complex</description>
	<lastBuildDate>Fri, 03 Feb 2012 17:24:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to rate Points Of Interest automatically</title>
		<link>http://i1t2b3.com/2010/03/13/how-to-rate-points-of-interest-automatically/</link>
		<comments>http://i1t2b3.com/2010/03/13/how-to-rate-points-of-interest-automatically/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 13:13:31 +0000</pubDate>
		<dc:creator>Skakunov Alexander</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ideas]]></category>

		<guid isPermaLink="false">http://i1t2b3.com/?p=579</guid>
		<description><![CDATA[During my work on sunnyrentals.com I&#8217;ve got a task to add 2 closest airports to every property an owner creates. I implemented it quite fast since we have a database of airports with coordinates. While playing with this feature, we found out that it is not good enough — the real task must be to [...]]]></description>
			<content:encoded><![CDATA[<p>During my work on <strong>sunnyrentals.com</strong> I&#8217;ve got a task to add 2 closest airports to every property an owner creates.</p>
<p>I implemented it quite fast since we have a database of airports with coordinates.</p>
<p>While playing with this feature, we found out that it is not good enough — the real task must be to add 2 <strong>closest and biggest</strong> airports. The problem is that we don&#8217;t have any data in airports DB to guess how big or famous a particular airport is.</p>
<p>So we need to rate every airport somehow&#8230;</p>
<p>The solution we found was simple — we need to google for the airport name and get the search results count. The count can be considered as rating value — London Heathrow airport has 2.33 million results while Kiev Zhulyany airport has only 0.77 mln which looks fair.</p>
<p>Several things to pay attention to:</p>
<ul>
<li>the query we formed was [city name] + [airport name] + &#8216; airport&#8217;</li>
<li>if this query gives zero result, I omit the city name — at times it hepls</li>
<li>we put the query into quotes to google for the exact phrase, otherwise the London City airport gets the highest rating due to the fact that &#8220;<em>city</em>&#8221; is a general term</li>
<li>if the airport name includes the city name (<em>Melbourne Intl</em>), we omit the city name — &#8221;<em>Melbourne Intl airport</em>&#8221; is better then &#8220;<em>Melbourne Melbourne Intl airport</em>&#8220;</li>
<li>in addition to previous idea — if the airport name sounds like the city name, we omit the city name as well. Example: Narsarsuaq airport in Narssarssuaq city. I used <code>soundex</code> function for this comparison — it&#8217;s present in PHP and MySQL.</li>
</ul>
<p>To get the google results you can use the <noindex><a rel="nofollow" href="http://code.google.com/intl/en-US/apis/ajaxsearch/documentation/#fonje">Google Search API</a></noindex>:</p>
<pre><code>$queryTemplate = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;q=%s';
$airportQuery = '"London Heathrow airport"';
$query = sprintf( $queryTemplate, urlencode( $airportQuery ) );
$json = json_decode( file_get_contents( $query ), 1 );
$rating = (int)$json['responseData']['cursor']['estimatedResultCount'];</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://i1t2b3.com/2010/03/13/how-to-rate-points-of-interest-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to import tickets into Assembla</title>
		<link>http://i1t2b3.com/2009/08/26/how-to-import-tickets-assembla/</link>
		<comments>http://i1t2b3.com/2009/08/26/how-to-import-tickets-assembla/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 10:07:31 +0000</pubDate>
		<dc:creator>Skakunov Alexander</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[assembla]]></category>
		<category><![CDATA[ideas]]></category>

		<guid isPermaLink="false">http://i1t2b3.com/?p=481</guid>
		<description><![CDATA[I use Assembla for my projects, and I found that export/import tickets feature works tricky — it works based on a combination of JSON and CSV format. It seems the guys in Assembla are on a way to proprietary formats The only usage of it is only for moving tickets from one Assembla space to [...]]]></description>
			<content:encoded><![CDATA[<p>I use Assembla for my projects, and I found that export/import tickets feature works tricky — it works based on a combination of JSON and CSV format. It seems the guys in Assembla are on a way to proprietary formats <img src='http://i1t2b3.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  The only usage of it is only for moving tickets from one Assembla space to another.</p>
<p>So this post is about how to use what they offer to add lots of tickets that you have listed in your text file. I am lazy — instead of adding 90+ tickets manually, I&#8217;d better create a tool to do it for me.</p>
<h3>Task</h3>
<p>You have tickets titles and descriptions as text, and you want to add these tickets to Assembla.</p>
<h3>My solution</h3>
<p>Let&#8217;s investigate what format should our data be of so that Assembla could digest it. Go to a space → <em>Tickets</em>  → <em>Settings</em>  → scroll down and find <em>Export &amp; Import</em> → click &#8220;<em>Export your tickets</em>&#8221; links and open the dump file in a text editor. Though it&#8217;s indicated that &#8220;<em>Tickets imported and exported in JSON format.</em>&#8220;, it&#8217;s not. It&#8217;s a mix.</p>
<p>The dump file contains blocks that represent spaces, milestones, tickets, comments, custom fields values and tickets associations. Every such block contains 2 parts: list of fields and bigger part — actual data of this fields.</p>
<p>What we need is tickets part.</p>
<p>This is a format definition part:</p>
<pre><code>tickets:fields, ["id","number","reporter_id","assigned_to_id","space_id","summary","priority","status","description","created_on","updated_at","milestone_id","component_id","notification_list","completed_date","working_hours","is_story","from_support"]</code></pre>
<p>And this is an example of ticket data:</p>
<pre><code>tickets, ["40999","1","dNltOqvXKr3RN3e","FoGbar3zTtab7rAJ","b3OWYeJe5aVNr","Property owner profile - create new","3","3","","2009-06-16 07:23:35","2009-07-05 10:43:58","94111","12",null,"2009-07-05 10:43:58",null,"0","0"]</code></pre>
<p>So, <strong>the solution is to create a list of tickets data by the format given</strong>. Here is how I did that.</p>
<p>1. I have Excel spreadsheet with two columns — the ticket title and description.</p>
<p>2. Export it as CSV, and open it having it like this:</p>
<pre><code class="no-highlight">Home page: Update design,Set numbers after locations
Photos: hide step 2,Show only Step 1 until you select files and then show step 2 to upload files.</code></pre>
<p>3. Use text replace to put every value in quotes (hint: use a line ending symbol as a replacement &mdash; even Microsoft Word can do that)</p>
<pre><code class="no-highlight">"Home page: Update design","Set numbers after locations"
"Photos upload: hide step 2","Show Step 2 only if files are selected."</code></pre>
<p>(One way round is to load the CSV data into database by PHPMyAdmin and export it back as CSV &mdash; it will be quoted <img src='http://i1t2b3.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>4. Add Assembla header to the top of this file</p>
<p>5. Move &#8216;<em>summary</em>&#8216; and &#8216;<em>description</em>&#8216; columns go first, so it was</p>
<pre><code class="javascript">tickets:fields, ["id","number","reporter_id","assigned_to_id","space_id","<strong>summary</strong>","priority",...</code></pre>
<p>and it becomes</p>
<pre><code class="javascript">tickets:fields, ["<strong>summary</strong>","<strong>description</strong>","id","number","reporter_id","assigned_to_id","space_id","priority",...</code></pre>
<p> (We need all the columns because it seems that Assembla's import engine is not smart enough to deal with missing fields).</p>
<p>6. Edit our tickets data lines (text replace again) so that it looked like Assembla tickets data, i.e. add '<em>tickets, [</em>' at the beginning, dummy values for the rest of the fields and the closing square bracket. <strong>Don't forget that we moved '<em>summary</em>' and '<em>description</em>' columns to go first!</strong>. So we have:</p>
<pre><code class="javascript">tickets, ["Home page: Update design","Set numbers after locations","40999","1","dNltOqvXKr3RN3e","FoGbar3zTtab7rAJ","b3OWYeJe5aVNr","3","3","2009-06-16 07:23:35","2009-07-05 10:43:58","94111","12",null,"2009-07-05 10:43:58",null,"0","0"]
tickets, ["Photos upload: hide step 2","Show Step 2 only if files are selected.","40999","1","dNltOqvXKr3RN3e","FoGbar3zTtab7rAJ","b3OWYeJe5aVNr","3","3","2009-06-16 07:23:35","2009-07-05 10:43:58","94111","12",null,"2009-07-05 10:43:58",null,"0","0"]</code></pre>
<p>By the way, I prefer to clear the values of some columns like &#8216;<em>id</em>&#8216;, &#8216;<em>number</em>&#8216; (ticket number) and so on &mdash; so that Assembla assigned it itself.</p>
<p>OK, it seems your file is ready to be fed to Assembla. I advise you to create an empty free space and try on it first if don&#8217;t want to mess up your current space.</p>
<p>If the import engine has some parsing problems with your file (missing quote for example) you will get a notice. If you get an Application Error, some columns or their values are missing &mdash; check your file.</p>
<p>One more tip &mdash; your tickets will be added as &#8216;<em>No milestone</em>&#8216;. If you want your new tickets to be added into a new milestone, paste a milestone defenition in the beginning of your file and replace milestone ID in the tickets data by it&#8217;s ID:</p>
<pre><code class="javascript">milestones:fields, ["id","due_date","title","user_id","created_at","created_by","space_id","description","is_completed","completed_date","from_basecamp","basecamp_milestone_id","updated_at","updated_by"]
milestones, ["1111","2009-09-09","Big shot of development","cv2gFo","2009-08-25 13:12:09","cv2gFo","bktPVqwKmr3OWYeJe5aVNr","Work hard to finish all that was discussed.","0",null,"0",null,"2009-08-25 13:12:09","cv2gFo"]</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://i1t2b3.com/2009/08/26/how-to-import-tickets-assembla/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Analytics API launched!</title>
		<link>http://i1t2b3.com/2009/05/07/google-analytics-api-launched/</link>
		<comments>http://i1t2b3.com/2009/05/07/google-analytics-api-launched/#comments</comments>
		<pubDate>Thu, 07 May 2009 11:44:11 +0000</pubDate>
		<dc:creator>Skakunov Alexander</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://i1t2b3.com/?p=295</guid>
		<description><![CDATA[This week Google has launched Google Analytics API. Now developers can use the analytical power of Google in their own services. For example, if you want to access Google Analytics by your phone, use Android application by Actual Metrics. Do you want the Analytics on your desktop? There is a Desktop-Reporting for that purpose. If [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2009/05/refresh_analytics_screenshot.gif"><img class="alignright size-medium wp-image-297" title="Google Anal" src="http://i1t2b3.com/wp-content/uploads/2009/05/refresh_analytics_screenshot-300x280.gif" alt="" width="180" height="168" /></a>This week Google has launched Google Analytics API. Now developers can use the analytical power of Google in their own services.</p>
<p>For example, if you want to access Google Analytics by your phone, use <noindex><a rel="nofollow" href="http://www.analyticsmarket.com/mobileapps/mobile-ga/android">Android application</a></noindex> by Actual Metrics. Do you want the Analytics on your desktop? There is a Desktop-Reporting for that purpose.</p>
<p>If you are interested in integration of Google Analytics into your own business, take a look at such examples.</p>
<p>MailChimp <noindex><a rel="nofollow" href="http://www.mailchimp.com/features/power_features/analytics360/">integrated Google Analytics to email marketing platform.</a></noindex></p>
<p><noindex><a rel="nofollow" href="http://www.mailchimp.com/features/power_features/analytics360/"></a></noindex>ShufflePoint® offers the <noindex><a rel="nofollow" href="http://www.shufflepoint.com/GoogleAnalytics.aspx">addition of data from Google Analytics to the presentations of PowerPoint®</a></noindex>.</p>
<p>Look at youcalc that have created software that allows you to <noindex><a rel="nofollow" href="http://www.youcalc.com/apps/tag/GA">mix up Google Analytics, AdWords, Salesforce.com</a></noindex> and other data companies.</p>
<p>Need more examples? Look at samples <noindex><a rel="nofollow" href="http://code.google.com/apis/analytics/docs/gdata/gdataGallery.html">from the customers</a></noindex> on the Google developers website.</p>
]]></content:encoded>
			<wfw:commentRss>http://i1t2b3.com/2009/05/07/google-analytics-api-launched/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

