]> git.cworth.org Git - empires-api/commitdiff
Implement a few changes after an initial implementation
authorCarl Worth <cworth@cworth.org>
Sun, 3 May 2020 02:22:19 +0000 (19:22 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 3 May 2020 02:22:19 +0000 (19:22 -0700)
Specifically, we change the following:

  * Rename /escape/ to /liberate

  * Rename the "captured" json field to "captures"

  * Drop the /players/<id> API

api.text

index 91a390cb927e705a6aa7a85aeca8fb05b9189d2a..4bf4d0380db226fb73a8c83dffd4b2fe6fff1f8e 100644 (file)
--- a/api.text
+++ b/api.text
@@ -33,7 +33,7 @@ Gameplay API endpoints (within a current game)
 
     Behavior: Indicate that empire ID1 has now captured ID2
 
-/escape/<ID>
+/liberate/<ID>
 
     Method: POST
 
@@ -54,12 +54,12 @@ Gameplay API endpoints (within a current game)
 
     Behavior: Shows which empires have been captured by other empires
 
-    Example data [ { "id": 1, "captured": [] },
-                   { "id": 2, "captured": [1] },
-                   { "id": 3, "captured": [4, 5, 6] },
-                   { "id": 4, "captured": [2] },
-                   { "id": 5, "captured": [] },
-                   { "id": 6, "captured": [] } ]
+    Example data [ { "id": 1, "captures": [] },
+                   { "id": 2, "captures": [1] },
+                   { "id": 3, "captures": [4, 5, 6] },
+                   { "id": 4, "captures": [2] },
+                   { "id": 5, "captures": [] },
+                   { "id": 6, "captures": [] } ]
 
 /players
 
@@ -70,12 +70,6 @@ Gameplay API endpoints (within a current game)
 
     Example data: [ { id: 1, name: "Carl" }, { id: 2, name: "Kevin" } ]
 
-/players/<id>
-
-    Method: GET
-
-    Behavior: Get a single player by its id
-
 Server
 ======
 There's a sample server available at: https://families.cworth.org/