

@require_settings('BITLY_ACCESS_TOKEN')
@respond_to('^bitly (?P<long_url>.*)$')
def say_bitly_short_url(self, message, long_url=None):
    'bitly ___: Shorten long_url using bitly service.'
    try:
        import bitly_api
    except ImportError:
        raise ImportError("Can't load BitlyPlugin, since the bitly_api python module isn't installed.\nTo install it, run:\n  pip install bitly_api")
    c = bitly_api.Connection(access_token=settings.BITLY_ACCESS_TOKEN)
    response = c.shorten(uri=long_url)
    short_url = long_url['url']
    self.say(('Shorten URL: %s' % short_url), message=message)

dataset/ETHPy150Open skoczen/will/will/plugins/productivity/bitly.py BitlyPlugin.say_bitly_short_url/VarMisuse@76/195 `response`->`long_url`