From e5e3acca67ae0e9118f77898b63f7d7c78c06e4e Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 23 May 2020 11:26:00 -0700 Subject: [PATCH] Document the new /profile API This can be used to set a nickname, (and a set nickname can be used instead of the "name" for the empires /register API). --- api.text | 9 ++++++++- lmno.txt | 10 ++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) 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" } diff --git a/lmno.txt b/lmno.txt index 3caa236..aaad24b 100644 --- a/lmno.txt +++ b/lmno.txt @@ -29,6 +29,16 @@ Type: Dynamic Redirects to https://lmno.games//WXYZ/ +http://lmno.games/profile/ +-------------------------- +Method: PUT + + Stores profile information in the current session. + + Supported fields: nickname + + Example data: { "nickname": "Carl" } + https//lmno.games/new/ (POST) ------------------------------------- Type: Dynamic -- 2.43.0