]> git.cworth.org Git - lmno-api/commitdiff
Update Empires /register endpoint to return the generated ID
authorCarl Worth <cworth@cworth.org>
Sun, 31 May 2020 22:58:39 +0000 (15:58 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 31 May 2020 22:58:39 +0000 (15:58 -0700)
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.

empires.txt

index da590a3039521c24196acbc02840b3bd1d3d28c7..28cc7313e8a2a3c82f12a850428e69400d4fc776 100644 (file)
@@ -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/<ID>
 
     Method: POST