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
- Host: GitHub
- URL: https://github.com/igrishaev/googl-python
- Owner: igrishaev
- Created: 2012-07-18T04:20:24.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2016-01-08T11:05:41.000Z (about 10 years ago)
- Last Synced: 2025-01-05T20:42:32.166Z (about 1 year ago)
- Size: 87.9 KB
- Stars: 10
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)