Migrated from generic-functions v1

ryanmcgrath 2010-09-13 02:21:26 -07:00
parent 54004d470c
commit 94d01186cf

24
Generic-Functions.textile Normal file

@ -0,0 +1,24 @@
h1. Generic Tango Functions
The following functions serve basic needs, both in terms of the library itself, and some auxiliary functions.
shortenURL()
Returns a specified url shortened by is.gd. The choice of url shortener can be overridden if necessary. Most url shorteners have API limits; be sure to investigate this before you use this in a widespread manner.
Parameters:
url_to_shorten: (Required) The url that you want shortened.
shortener: (Optional) The url of your desired shortener API. Defaults to http://is.gd/api.php.
query: (Required if overriding default service) The name of the url parameter you're passing to the service.
<pre>
<code>
import tango
# Shortening URLs requires no authentication, huzzah
twitter = tango.setup()
shortURL = twitter.shortenURL("http://www.webs.com/")
print shortURL
</code>
</pre>