<?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>Ismail Dhorat &#187; python</title>
	<atom:link href="http://ismaild.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://ismaild.com</link>
	<description>Peering over the Edge of Tech,Life &#38; Politics....</description>
	<lastBuildDate>Thu, 26 Nov 2009 09:09:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Python library for the foursquare API</title>
		<link>http://ismaild.com/foursquare-api-python/</link>
		<comments>http://ismaild.com/foursquare-api-python/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 09:06:50 +0000</pubDate>
		<dc:creator>Ismail Dhorat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[foursquare]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://ismaild.com/?p=380</guid>
		<description><![CDATA[I have just released some open source code over at GitHub, it&#8217;s a simple wrapper library for the foursquare API. You should be familiar with the official API docs before making use of the library, since most of the parameters required are the same as the parameters for the foursquare API. 
The full source code [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">I</span> have just released some open source code over at GitHub, it&#8217;s a simple wrapper library for the <a href="http://foursquare.com/">foursquare</a> API. You should be familiar with the <a href="http://groups.google.com/group/foursquare-api/web/api-documentation">official API docs</a> before making use of the library, since most of the parameters required are the same as the parameters for the foursquare API. </p>
<p>The full source code is available over at: <a href="http://github.com/zyelabs/python-foursquare">http://github.com/zyelabs/python-foursquare</a></p>
<p><strong>Grabbing the code:</strong></p>
<ul>
<li> <a href="http://github.com/zyelabs/python-foursquare/zipball/master">Download a zip file</a>
</li>
<li><a href="http://github.com/zyelabs/python-foursquare/tarball/master">Download a tar file</a></li>
<li>git clone git://github.com/zyelabs/python-foursquare.git</li>
<p><strong>Installing</strong><br />
<code><br />
python setup.py install<br />
</code><br />
<strong>Usage</strong><br />
<code><br />
import foursquare<br />
#get help<br />
help(foursquare)</p>
<p># Instantiate a foursquare API class<br />
api = foursquare.Api()</p>
<p># Test if an API Request will work, returns True or False<br />
test = api.test()</p>
<p># Return a list of cities<br />
cities = api.get_cities()</p>
<p># Get the closest city for a given geolat &#038; geolong<br />
closest_city = api.check_city(-25.091874,27.057225)</p>
<p># get checkins<br />
checkins = api.get_checkins(username, password)</p>
<p># get friends<br />
friends = api.get_friends(username, password)<br />
</code></p>
<p>All the methods for the foursquare API have been implemented, just use pythons help system to get the different calls and methods. i.e run: help(foursquare)</p>
<p>Also note, with regards to optional params sent to the foursquare API the keyword argument name is mapped to that of the foursquare API. for example the userdetail endpoint takes an optional param <strong>mayor=1</strong> the method in the library takes the <strong>same argument</strong>. </p>
<p>The only exception to this is the set_pings method, since the param required by foursquare is &#8216;<strong>self</strong>&#8216; . To use this method:<br />
<code><br />
# set pings off (Globally) for authenticated user<br />
api.set_pings(username, password, me='off')</p>
<p># set pings on (globally)<br />
api.set_pings(username, password, me='on')</p>
<p># set pings on/off for a list of friends<br />
# friends must be a list of dictionaries<br />
# 1 to enable and 0 to disable<br />
change_pings = [{'uid'=123, 'ping': 1}, {'uid'=456, 'ping': 0}]<br />
api.set_pings(username, password, friends=change_pings, me='goodnight')<br />
</code></p>
<p>If you pick up any bugs or issues, pop me a message. </p>
]]></content:encoded>
			<wfw:commentRss>http://ismaild.com/foursquare-api-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.295 seconds -->
