[API] Put the C in CRUD for the Add-on model

RESOLVED FIXED in 5.12

Status

P1
normal
RESOLVED FIXED
8 years ago
3 years ago

People

(Reporter: clouserw, Assigned: davedash)

Tracking

unspecified
5.12
Dependency tree / graph

Details

(Whiteboard: [devtools][Q32010][qa-], URL)

(Reporter)

Description

8 years ago
Spec: https://wiki.mozilla.org/User:Clouserw/AMO/API

There is a bit of a spec at the URL above, but most of it is just straight up CRUD.  The piston docs[1] can help with how to integrate map our models to their classes.  This should use the JSONEmitter and accept at least JSON as input (it looks like piston does this for free).  This should use our OAUTH setup for authentication.

[1] http://bitbucket.org/jespern/django-piston/wiki/Documentation#piston-documentation
(Reporter)

Updated

8 years ago
Target Milestone: 5.11.9 → 5.12
Is this /addons/ via PUT in your docs?  

In my mind it should be POST, not PUT...
Also is the addon XPI to be base64 encoded?

Also, not familiar with XPIs but is there enough data in the XPI that a version can be created automatically: version, platforms, etc?
(Reporter)

Comment 3

8 years ago
> Is this /addons/ via PUT in your docs?

Yes

> In my mind it should be POST, not PUT...
You're right.  The spec was originally written with the idea that put==create (which is still how I read the RESTful guidelines), but stick with what the piston docs say.  I updated the spec, but let me know if you think there is anything else that needs adjusting.

> Also is the addon XPI to be base64 encoded?
Is there a reason not to use multipart/form-data to send it as a file?

> Also, not familiar with XPIs but is there enough data in the XPI that a
> version can be created automatically: version, platforms, etc?
I think so, CCing Jorge.
multipart/form-data makes sense... 

writing tests for this will be a PITA...

oh wait, it already is a PITA... OAuth is a bitch.
https://developer.mozilla.org/en/Install_Manifests

install.rdf should contain the add-on UUID, name, version number and application compatibility, including version ranges. What it normally doesn't have is the platform information, which is something the author indicates when uploading it.
(Reporter)

Updated

8 years ago
Depends on: 592517, 592516
(Reporter)

Updated

8 years ago
Assignee: nobody → dd
http://github.com/jbalogh/zamboni/commit/d27ccef
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.