X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=api.text;fp=api.text;h=42d4f0ee459dbecc99f313da8557fbf522f8a826;hb=e5e3acca67ae0e9118f77898b63f7d7c78c06e4e;hp=26f0a4d92f4e40ecf330b1832a5932208434a197;hpb=5c24a08cc64da0987e18e5ef941e05c135298cf2;p=empires-api diff --git a/api.text b/api.text index 26f0a4d..42d4f0e 100644 --- a/api.text +++ b/api.text @@ -97,7 +97,14 @@ For a specific game the following API endpoints are defined. Method: POST - Behavior: Adds a new player with "name" and "character" and assigns an id. Also will add a new empire with empty "captured" array + Behavior: Adds a new player with "name" and "character" and + assigns an id. Also will add a new empire with empty "captured" + array. + + Note: If the client supports cookies and has previously set a + nickname in the current session via the upper-level /profile API, + then the name can be omitted from the data here and the profile + nickname will be used instead. Example data: { "name": "Carl", "character: "Elvis" }