]> git.cworth.org Git - lmno-api/blob - lmno.txt
Document player-info, player-enter, and player-update events
[lmno-api] / lmno.txt
1 Web interface for lmno.games server
2 ===================================
3 https://lmno.games/*
4 --------------------
5 Serves static content (if file exists in filesystem),
6 otherwise proxies to dynamic server.
7
8 https://lmno.games/
9 ------------------
10 Type: Static
11
12 Form: "Join game: (ID)"
13
14   Dynamic lookup
15   Redirects to https://lmno.games/<game_engine>/<ID>/
16   For example: https://lmno.games/empires/WXYZ/
17
18 Links: Host a new game:
19
20   "Empires" links to https://lmno.games/empires
21
22   "Other game" links to https://lmno.games/other_game
23
24   etc.
25
26 https://lmno.games/WXYZ/
27 ------------------------
28 Type: Dynamic
29
30   Redirects to https://lmno.games/<game_engine>/WXYZ/
31
32 http://lmno.games/profile/
33 --------------------------
34 Method: PUT
35
36   Stores profile information in the current session.
37
38   Supported fields: nickname
39
40   Example data: { "nickname": "Carl" }
41
42 https//lmno.games/new/<engine> (POST)
43 -------------------------------------
44 Type: Dynamic
45
46 Creates a new, unique game ID and returns it as a JSON string
47
48   Returns: "WXYZ"
49
50 https://lmno.games/empires
51 --------------------------
52 Type: Static
53
54 Form: Start a new game
55
56   Sends POST to https://lmno.games/new/empires
57   Receives game ID as a JSON string (for example, "WXYZ")
58
59 https://lmno.games/empires/WXYZ?flavor=flutter
60 ----------------------------------------------
61 Type: Dynamic (to lookup game ID), but otherwise a static result
62
63 Serves game content (either the default or the "flutter" flavor)
64
65 Buttons, forms, etc.:
66
67   https://lmno.games/WXYZ/empires/register (form action="/empires/register")
68   https://lmno.games/WXYZ/empires/events
69   etc.
70
71 Native mobile client
72 ====================
73 Join game (ID):
74
75   Client saves game ID (WXYZ, say)
76
77 Client queries game state
78
79   https://lmno.games/WXYZ/empires/players
80
81 Client posts game updates:
82
83   https://lmno.games/WXYZ/empires/register
84   etc.
85
86 New game:
87
88   https://lmno.games/