Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created August 11, 2011 14:13
Show Gist options
  • Save andymckay/1139750 to your computer and use it in GitHub Desktop.
Save andymckay/1139750 to your computer and use it in GitHub Desktop.
from amo import AMOOAuth
if 1:
username = '[email protected]'
amo = AMOOAuth(domain="addons.mozilla.local", port=8000, protocol='http',
three_legged=False)
amo.set_consumer(consumer_key='xx',
consumer_secret='xx')
data = {'xpi':open('github-bugzilla-0.5.xpi'),
'platform':'all'}
data = amo.create_addon(data)
print data
id = data['id']
data = {'xpi':open('github-bugzilla-0.6.xpi'),
'platform':'all'}
data = amo.create_version(data, id)
print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment