Add REST API endpoints for user's contribution agreements

Add two new REST API endpoints to list the user's contribution
agreements, and to enter a contribution agreement.

The list of contribution agreements differs from the existing RPC
endpoint in that it only returns a list of the agreements that the
user has entered; it does not include a list of existing agreements.

Bug: Issue 4316
Change-Id: I7d988aa59c06380767d888e22f6e0eaad62d8b34
This commit is contained in:
David Pursehouse
2016-05-02 22:30:59 +09:00
committed by David Pursehouse
parent 9f7e37cbf7
commit 4578763c7a
10 changed files with 526 additions and 0 deletions

View File

@@ -82,6 +82,9 @@ public class Module extends RestApiModule {
put(ACCOUNT_KIND, "preferences.edit").to(SetEditPreferences.class);
get(CAPABILITY_KIND).to(GetCapabilities.CheckOne.class);
get(ACCOUNT_KIND, "agreements").to(GetAgreements.class);
put(ACCOUNT_KIND, "agreements").to(PutAgreement.class);
child(ACCOUNT_KIND, "starred.changes").to(StarredChanges.class);
put(STARRED_CHANGE_KIND).to(StarredChanges.Put.class);
delete(STARRED_CHANGE_KIND).to(StarredChanges.Delete.class);