From: Carl Worth Date: Sun, 31 May 2020 22:58:39 +0000 (-0700) Subject: Update Empires /register endpoint to return the generated ID X-Git-Url: https://git.cworth.org/git?p=empires-api;a=commitdiff_plain;h=a6ee81b25dbe5e6b2bd25cb25606a26c0d699036 Update Empires /register endpoint to return the generated ID When augmenting the test suite, I noticed I needed this value and was surprised it wasn't already being returned. With this change we bump the version up to 0.8. --- diff --git a/empires.txt b/empires.txt index da590a3..28cc731 100644 --- a/empires.txt +++ b/empires.txt @@ -1,6 +1,6 @@ Empires Game Protocol ===================== -Version: 0.7 +Version: 0.8 For a specific game the following API endpoints are defined. (Note: Only the trailing portion of the API URI is provided here. @@ -99,7 +99,7 @@ For a specific game the following API endpoints are defined. Behavior: Adds a new player with "name" and "character" and assigns an id. Also will add a new empire with empty "captured" - array. + array. Returns the numeric ID of the new player. Note: If the client supports cookies and has previously set a nickname in the current session via the upper-level /profile API, @@ -108,6 +108,8 @@ For a specific game the following API endpoints are defined. Example data: { "name": "Carl", "character: "Elvis" } + Example return data: 2 + /deregister/ Method: POST