Browse Source

Planning some new endpoints

Kirk Trombley 5 years ago
parent
commit
b0192f0c2b
1 changed files with 36 additions and 1 deletions
  1. 36 1
      README.md

+ 36 - 1
README.md

@@ -62,6 +62,40 @@ GET /game/{ID}
         ],
         "linkedGame": string || null
     }
+GET /game/{ID}/config
+    Returns 404 vs 200 and {
+        "timer": number,
+        "rounds": number,
+        "onlyAmerica": boolean,
+    }
+GET /game/{ID}/coords
+    Returns 404 vs 200 and {
+        "1": {
+            "lat": number,
+            "lng": number,
+        }, ...
+    }
+GET /game/{ID}/players
+    Returns 404 vs 200 and {
+        "players": [
+            {
+                "name": string,
+                "currentRound": string || null,
+                "totalScore": number,
+                "guesses": {
+                    "1": {
+                        "lat": number,
+                        "lng": number,
+                        "score": number || null,
+                    }, ...
+                }
+            }, ...
+        ]
+    }
+GET /game/{ID}/linked
+    Returns 404 vs 200 and {
+        "linkedGame": string || null
+    }
 POST /game/{ID}/linked
     Accepts {
         "linkedGame": string
@@ -105,4 +139,5 @@ POST /game/{ID}/guesses/{round}
 - Improve error handling in UI
 - Override google controls in streetview, make custom divs
 - Modify scoring to linear interp in the middle
-- Alternative game mode: Single timer across all rounds
+- Alternative game mode: Single timer across all rounds
+- Timestamps/hashes in info responses so checks can be faster