diff --git a/Generic-Functions.textile b/Generic-Functions.textile new file mode 100644 index 0000000..58288ce --- /dev/null +++ b/Generic-Functions.textile @@ -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. + +
+
+import tango
+
+# Shortening URLs requires no authentication, huzzah
+twitter = tango.setup()
+shortURL = twitter.shortenURL("http://www.webs.com/")
+
+print shortURL
+
+
\ No newline at end of file