~khurshid-alam/gwibber/gwibber-hack

« back to all changes in this revision

Viewing changes to gwibber/microblog/urlshorter/zima.py

  • Committer: Khurshid Alam
  • Date: 2012-04-06 14:38:38 UTC
  • Revision ID: khurshid.alam@linuxmail.org-20120406143838-nz7hjg8vtzi2wl7i
initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
"""
 
3
 
 
4
Zi.ma interface for Gwibber
 
5
macno (Michele Azzolari) - 02/20/2008
 
6
 
 
7
"""
 
8
 
 
9
import urllib2
 
10
 
 
11
PROTOCOL_INFO = {
 
12
 
 
13
  "name": "zi.ma",
 
14
  "version": 0.1,
 
15
  "fqdn" : "http://zi.ma",
 
16
  
 
17
}
 
18
 
 
19
class URLShorter:
 
20
 
 
21
  def short(self, text):
 
22
    short = urllib2.urlopen("http://zi.ma/?module=ShortURL&file=Add&mode=API&url=%s" % urllib2.quote(text)).read()
 
23
    return short
 
24