An open API service indexing awesome lists of open source software.

https://github.com/igrishaev/googl-python

Goo.gl library for Python
https://github.com/igrishaev/googl-python

Last synced: 11 months ago
JSON representation

Goo.gl library for Python

Awesome Lists containing this project

README

          

# Sample usage

import googl

client = googl.Googl("API_key")

result = client.shorten("http://code.google.com/p/python-googl-client/")
print result
>>> {
u'kind': u'urlshortener#url',
u'id': u'http://goo.gl/bUnil',
u'longUrl': u'http://code.google.com/p/python-googl-client/'
}

print client.expand(result["id"])
>>> {
u'status': u'OK',
u'kind': u'urlshortener#url',
u'id': u'http://goo.gl/WubiJ',
u'longUrl': u'http://code.google.com/p/python-googl-client/'
}

# ClientLogin Auth

client_login = googl.get_client_login("login", "pass")
client = googl.Googl("API_key", client_login=client_login)