Skip to content

Instantly share code, notes, and snippets.

@gregglind
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregglind/8d381089191d58530222 to your computer and use it in GitHub Desktop.
Save gregglind/8d381089191d58530222 to your computer and use it in GitHub Desktop.
Accessing The Mozilla Addons (AMO) API examples.
# https://developer.mozilla.org/en-US/docs/addons.mozilla.org_%28AMO%29_API_Developers%27_Guide/The_generic_AMO_API
# by search
curl 'https://services.addons.mozilla.org/en-US/firefox/api/1.5/search/guid:firefox-hotfix@mozilla.org' | xmllint --format - | grep '<icon'
# by id
curl 'https://services.addons.mozilla.org/en-US/firefox/api/1.5/addon/1-click-youtube-video-downl?format=json' | python -m json.tool | grep '"icon":'
# by amo id
curl -s https://services.addons.mozilla.org/en-US/firefox/api/1.5/addon/1865 | xmllint --format - | grep icon
## hotter!
npm install -g underscore-cli # https://github.com/ddopson/underscore-cli
curl -s 'https://services.addons.mozilla.org/en-US/firefox/api/1.5/addon/1-click-youtube-video-downl?format=json' | underscore extract icon
#"https://addons.cdn.mozilla.net/img/uploads/addon_icons/13/13990-32.png?modified=1393302027"
# thanks to John-Galt and cvan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment