Skip to content

Instantly share code, notes, and snippets.

@arieljannai
Created January 26, 2016 13:46
Show Gist options
  • Save arieljannai/20500b3f0ad86bb8f880 to your computer and use it in GitHub Desktop.
Save arieljannai/20500b3f0ad86bb8f880 to your computer and use it in GitHub Desktop.
Mozilla add ons api
# the node app retrieves the jwt token
# result in: upload-amo-result.json
echo "curl https://addons.mozilla.org/api/v3/addons/{%%%ADDON_UUID%%%}/versions/%%%ADDON_VERSION%%%/ -XPUT --form 'upload=@C:/firefox-addon.xpi' -H 'Authorization: $(node index.js)'" | sh
# result in: status-amo-result.json
echo "curl https://addons.mozilla.org/api/v3/addons/%%%UPLOADER_MOZILLA_DEV_MAIL%%%/versions/%%%ADDON_VERSION%%%/uploads/%%%UPLOAD_PK%%%/ -H 'Authorization: $(node index.js)'" | sh
{
"active":true,
"automated_signing":true,
"url":"https://addons.mozilla.org/api/v3/addons/%%%UPLOADER_MOZILLA_DEV_MAIL%%%/versions/%%%ADDON_VERSION%%%/uploads/%%%UPLOAD_PK%%%/",
"files":[
{
"hash":"sha256:HASH_VALUE",
"signed":false,
"download_url":"https://addons.mozilla.org/api/v3/file/%%%FILE_ID%%%/my_extension-0.0.1.xpi?src=api"
}
],
"passed_review":true,
"pk":"%%%UPLOAD_PK%%%",
"processed":true,
"reviewed":true,
"valid":true,
"validation_results":{
"errors":0,
"success":false,
"warnings":6,
"compatibility_summary":{
"notices":0,
"errors":0,
"warnings":0
},
"passed_auto_validation":false,
"ending_tier":5,
"messages":[ [Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object] ],
"detected_type":"extension",
"signing_summary":{
"high":0,
"medium":0,
"trivial":0,
"low":3
},
"notices":1,
"message_tree":{
"testcases_content":{
"__messages":[
],
"__warnings":1,
"__errors":0,
"__notices":0,
"signed_xpi":{
"__messages":[
"11111111111111111111111111111111"
],
"__warnings":1,
"__errors":0,
"__notices":0
}
},
"testcases_l10ncompleteness":{
"test_xpi":{
"__messages":[
],
"__warnings":0,
"__errors":0,
"__notices":1,
"no_locales":{
"__messages":[
"22222222222222222222222222222222"
],
"__warnings":0,
"__errors":0,
"__notices":1
}
},
"__messages":[
],
"__warnings":0,
"__errors":0,
"__notices":1
},
"testcases_javascript_traverser":{
"__messages":[
],
"__warnings":2,
"__errors":0,
"__notices":0,
"run":{
"__messages":[
],
"__warnings":2,
"__errors":0,
"__notices":0,
"namespace_pollution":{
"__messages":[
"33333333333333333333333333333333",
"44444444444444444444444444444444"
],
"__warnings":2,
"__errors":0,
"__notices":0
}
}
},
"js":{
"__messages":[
],
"__warnings":3,
"__errors":0,
"__notices":0,
"traverser":{
"__messages":[
],
"__warnings":3,
"__errors":0,
"__notices":0,
"dangerous_global":{
"__messages":[
"55555555555555555555555555555555",
"66666666666666666666666666666666",
"77777777777777777777777777777777"
],
"__warnings":3,
"__errors":0,
"__notices":0
}
}
}
},
"metadata":{
"name":"My Extension",
"version":"0.0.1",
"listed":false,
"requires_chrome":false,
"identified_files":{
},
"id":"%%%UPLOADER_MOZILLA_DEV_MAIL%%%",
"validator_version":"1.10.7"
}
},
"validation_url":"https://addons.mozilla.org/en-US/developers/upload/%%%UPLOAD_PK%%%",
"version":"0.0.1"
}
{
"active":false,
"automated_signing":true,
"url":"https://addons.mozilla.org/api/v3/addons/%%%UPLOADER_MOZILLA_DEV_MAIL%%%/versions/%%%ADDON_VERSION%%%/uploads/%%%UPLOAD_PK%%%/",
"files":[
],
"passed_review":false,
"pk":"%%%UPLOAD_PK%%%",
"processed":false,
"reviewed":false,
"valid":false,
"validation_results":null,
"validation_url":"%%%UPLOAD_PK%%%",
"version":"0.0.1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment