From: Carl Worth Date: Sun, 3 May 2020 02:22:19 +0000 (-0700) Subject: Implement a few changes after an initial implementation X-Git-Url: https://git.cworth.org/git?p=empires-api;a=commitdiff_plain;h=0411bdc5c4dbad187f7e25fa1fb40a23c3e0e940 Implement a few changes after an initial implementation Specifically, we change the following: * Rename /escape/ to /liberate * Rename the "captured" json field to "captures" * Drop the /players/ API --- diff --git a/api.text b/api.text index 91a390c..4bf4d03 100644 --- 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/ +/liberate/ 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/ - - Method: GET - - Behavior: Get a single player by its id - Server ====== There's a sample server available at: https://families.cworth.org/