]> git.cworth.org Git - lmno-api/blob - lmno.txt
Add a new protocol description for the new LMNO API
[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 https//lmno.games/new/<engine> (POST)
33 -------------------------------------
34 Type: Dynamic
35
36 Creates a new, unique game ID and returns it as a JSON string
37
38   Returns: "WXYZ"
39
40 https://lmno.games/empires
41 --------------------------
42 Type: Static
43
44 Form: Start a new game
45
46   Sends POST to https://lmno.games/new/empires
47   Receives game ID as a JSON string (for example, "WXYZ")
48
49 https://lmno.games/empires/WXYZ?flavor=flutter
50 ----------------------------------------------
51 Type: Dynamic (to lookup game ID), but otherwise a static result
52
53 Serves game content (either the default or the "flutter" flavor)
54
55 Buttons, forms, etc.:
56
57   https://lmno.games/WXYZ/empires/register (form action="/empires/register")
58   https://lmno.games/WXYZ/empires/events
59   etc.
60
61 Native mobile client
62 ====================
63 Join game (ID):
64
65   Client saves game ID (WXYZ, say)
66
67 Client queries game state
68
69   https://lmno.games/WXYZ/empires/players
70
71 Client posts game updates:
72
73   https://lmno.games/WXYZ/empires/register
74   etc.
75
76 New game:
77
78   https://lmno.games/