Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created July 12, 2011 18:22
Show Gist options
  • Save andymckay/1078604 to your computer and use it in GitHub Desktop.
Save andymckay/1078604 to your computer and use it in GitHub Desktop.
from amo import AMOOAuth
amo = AMOOAuth(domain="addons.mozilla.local", port=8000, protocol='http',
three_legged=False)
amo.set_consumer(consumer_key='CmAn9KhXR8SD3xUSrf',
consumer_secret='4hPsAW9yCecr4KRSR4DVKanCkgpqDETm')
print amo.get_user()
somexpi = open('github-bugzilla-0.5.xpi', 'r')
data = {'id': 'sdefsfd', 'name':'sdfsdf', 'text':'sdfsdf', 'eula':'sdfsdfsdf', 'builtin':0, 'guid': 'sdfsdfsdf', 'xpi': somexpi}
result = amo.create_addon(data)
print result
data = {'addon': result['id'], 'average': 0.1, 'appversion': 1, 'osversion': 1, 'test': 'ts'}
print amo.create_perf(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment