Closed Bug 586701 Opened 14 years ago Closed 14 years ago

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

Categories

(addons.mozilla.org Graveyard :: API, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: davedash)

References

()

Details

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

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
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?
> 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.
Depends on: 592517, 592516
Assignee: nobody → dd
http://github.com/jbalogh/zamboni/commit/d27ccef
Status: NEW → RESOLVED
Closed: 14 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.