Skip to content

Instantly share code, notes, and snippets.

@johnsheehan
Created July 31, 2013 19:52
Show Gist options
  • Save johnsheehan/6125520 to your computer and use it in GitHub Desktop.
Save johnsheehan/6125520 to your computer and use it in GitHub Desktop.
import sys
import bitly_api
import os
from config import config
# sign up for a free account at runscope.com and make
# note of your bucket key
# connect to bitly
conn_btly = bitly_api.Connection(access_token=config['ACCESS_TOKEN'])
conn_btly.host = 'api-bit-ly-runscopebucketkey.runscope.net'
conn_btly.ssl_host = 'api--ssl-bit-ly-runscopebucketkey.runscope.net'
# make request as normal
links = conn_btly.user_link_history()
# check your Runscope dashboard to see the traffic that was sent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment