def get_gif(api_key, gif_id):
    '''Returns dict with gif informations from the API.'''
    url = 'http://api.giphy.com/v1/gifs/{}?api_key={}'.format(gif_id, api_key)
    r = urlopen(url)

    return json.loads(r.read().decode('utf-8'))
Returns dict with gif informations from the API.