Add Developer Agreement API - #25418
Conversation
|
I think we'll want
|
bff56f5 to
e284efe
Compare
| .. http:post:: /api/v5/developers/agreement | ||
|
|
||
| :>json string display_name: User's chosen display name. | ||
| :>json string last_developer_agreement_change: The date of the last agreement change. | ||
|
|
||
| .. http:get:: /api/v5/developers/agreement | ||
|
|
||
| Returns the date of the last agreement change. | ||
|
|
There was a problem hiding this comment.
I think this feedback is targeted more towards the ticket itself than this work, but this doesn't match what I had in mind (and again, we should have fleshed this out better - one for a team retro imo).
Feel free to turn this into a proper discussion, I might have misunderstood things.
My expectations (these are just examples, I haven't validated these are real);
http:post::
:>json string user_uuid: something unique to identify the user with
:>json string accepted_agreement_version: version of the developer agreement accepted (or YYYY-MM-DD)
server inferred; UTC date developer agreement accepted
http:get:: (should be public, not internal only per ticket comment from @diox)
:>query/parameter:>json string user_uuid
:>returns: is_latest_accepted: boolean
:>returns: agreement_version: version of the developer agreement (or YYYY-MM-DD)
:>optional return (as in I'm questioning the value of this): agreement_content: markdown content of the latest developer agreement
There was a problem hiding this comment.
should be public, not internal only
Right now it (and the other API work I've done so far) are generally exclusively using SessionIDAuthentication, i.e. 'internal use'. Making it external is mainly adding JWT auth. Is that more in line with what would be needed? In which case I'd need to update those endpoints as well.
See: #25374 (comment)
dbdc51d to
5767296
Compare
5767296 to
cc5f64b
Compare
Fixes mozilla/addons#16377
Description
Adds developer agreement API.
Testing
At endpoint
api/v5/developers/agreement--last_developer_agreement_change. Returns 200.display_nameandlast_developer_agreement_changeto accept, if a) agreement was updated since the previous accept, or b) have not yet accepted before. Returns 202.Checklist
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository.