Skip to content

Commit

Permalink
Merge pull request #225 from tildezero/find-tossup-by-id
Browse files Browse the repository at this point in the history
api route to find a tossup by ID
  • Loading branch information
geoffrey-wu authored Nov 23, 2023
2 parents 3e2310a + 07e25d4 commit ce12f93
Show file tree
Hide file tree
Showing 20 changed files with 498 additions and 1 deletion.
172 changes: 172 additions & 0 deletions client/api-docs/bonus-by-id.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<!doctype html>
<html lang="en">

<head>
<title>QB Reader</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="The API documentation for QB Reader.">

<link href="/images/apple-touch-icon.png" rel="apple-touch-icon">
<link href="/images/apple-touch-icon-precomposed.png" rel="apple-touch-icon-precomposed">
<link type="image/x-icon" href="/favicon.ico" rel="icon">

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script src="/apply-theme.js"></script>
</head>

<body>
<nav class="navbar navbar-light navbar-expand-lg bg-custom" id="navbar" style="z-index: 10">
<div class="container-fluid">
<a class="navbar-brand ms-1 py-0" id="logo" href="/">
<span class="logo-prefix">QB</span><span class="logo-suffix">Reader</span>
</a>
<button class="navbar-toggler" data-bs-target="#navbarSupportedContent" data-bs-toggle="collapse" type="button"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="/tossups">Tossups</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/bonuses">Bonuses</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/multiplayer">Multiplayer</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/db">Database</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/geoword">Geoword</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="/api-docs" aria-current="page">API</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
<div class="d-flex">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="/user/login" id="login-link">Log in</a>
</li>
</ul>
</div>
</div>
</div>
</nav>

<div class="container-xl mt-3 mb-4 row">
<div class="col-md-1"></div> <!-- empty column for some left margin -->
<!-- docs sidebar -->
<div class="d-none d-md-block col-2 h-100" id="docsSidebar">
<h4 class="offcanvas-title" id="docsSidebarLabel">API Reference</h4>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a href="/api-docs"><code>Overview</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/schemas"><code>Object Schemas</code></a>
</li>
<h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/query"><code>query</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/random-bonus"><code>random-bonus</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/random-tossup"><code>random-tossup</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/packet"><code>packet</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/packet-tossups"><code>packet-tossups</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/packet-bonuses"><code>packet-bonuses</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/num-packets"><code>num-packets</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id" class="active fw-semibold" aria-current="page"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
</li>
<h5 class="mt-4 mb-2">Other</h5>
<li class="nav-item">
<a href="/api-docs/check-answer"><code>check-answer</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/report-question"><code>report-question</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/random-name"><code>random-name</code></a>
</li>
</ul>
</div>

<div class="col-12 col-md-9">
<h3 class="md-4">
<div><code>GET</code> <code>qbreader.org/api/bonus-by-id</code></div>
</h3>

<p>
Get a bonus by its ID.
</p>

<a href="#parameters" class="text-body">
<h4 class="mt-4 md-2" id="parameters">Parameters</h4>
</a>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<div>
<code>id</code><code class="text-muted">: string</code>
<code class="text-muted float-end fw-semibold text-decoration-underline">required</code>
</div>
<div>
The ID of the bonus.
</div>
</li>
</li>
</ul>

<a href="#returns" class="text-body">
<h4 class="mt-4 md-2" id="returns">Returns</h4>
</a>
<div>
A JSON <code>object</code> with the following properties:
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<div>
<code>bonus</code><code class="text-muted">: Bonus</code>
</div>
<div>
A singular <a href="/api-docs/schemas#bonus"><code>Bonus</code></a> with the given ID.
</div>
</li>
</ul>
</div>
</div>

<script src="/bootstrap/bootstrap.bundle.min.js"></script>
<script src="/script.js"></script>
</body>

</html>
6 changes: 6 additions & 0 deletions client/api-docs/check-answer.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
12 changes: 12 additions & 0 deletions client/api-docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down Expand Up @@ -191,6 +197,12 @@ <h5 class="mt-4 md-2">Database</h5>
</a>
<div>Get a list of all sets in the database.</div>
</li>
<li class="list-group-item">
<a href="/api-docs/tossup-by-id">
<div><code>GET</code> <code>/tossup-by-id</code></div>
</a>
<div>Get a single tossup by its ID.</div>
</li>
</ul>

<h5 class="mt-4 md-2">Multiplayer</h5>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/multiplayer/room-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list" class="active fw-semibold" aria-current="page"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/num-packets.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/packet-bonuses.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/packet-tossups.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/packet.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/random-bonus.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/random-name.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/random-tossup.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/report-question.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/schemas.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
6 changes: 6 additions & 0 deletions client/api-docs/set-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ <h5 class="mt-4 mb-2">Database</h5>
<li class="nav-item">
<a href="/api-docs/set-list" class="active fw-semibold" aria-current="page"><code>set-list</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/bonus-by-id"><code>bonus-by-id</code></a>
</li>
<li class="nav-item">
<a href="/api-docs/tossup-by-id"><code>tossup-by-id</code></a>
</li>
<h5 class="mt-4 mb-2">Multiplayer</h5>
<li class="nav-item">
<a href="/api-docs/multiplayer/room-list"><code>room-list</code></a>
Expand Down
Loading

0 comments on commit ce12f93

Please sign in to comment.