How to create Imgur cover albums via API?

I can create albums using modules requestsand oauth-hook, just fine, but I can't get the name to work. Check out the docs here: http://api.imgur.com/resources_auth#account_albums . I am using Windows7x64 Python2.7, requestsversion 0.21.1 and oauth-hookversion 0.4.0

Oddly, using the same approach to name an image when it loads, the script works just fine. Here is the relevant code:

client = requests.session(hooks={'pre_request': authorizedHook})

url = r'http://api.imgur.com/2/account/albums.json'

parameters = {'title': 'ALBUMTITLEHERE'}

r = client.post(url, data=parameters)

which returns something like this as soon as I load it into json:

    Created Album data:
    {u'albums': {u'anonymous_link': u'http://imgur.com/a/i3Gal',
                 u'cover': u'',
                 u'datetime': u'2012-05-24 02:34:42',
                 u'description': u'',
                 u'id': u'i3Gal',
                 u'layout': u'blog',
                 u'link': u'http://tankorsmash.imgur.com/1B498',
                 u'order': 0,
                 u'privacy': u'public',
                 u'title': u''}}    

What I was expecting is a named gallery called ALBUMTITLEHERE. But instead created a nameless one. What am I doing wrong?

: API Stats, , , , .

+3
1

Edit:

, , http url, post (json, urlencoded, even xml)... wirehark - .

, .

, API. .

.

+4

All Articles