Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #332

Merged
merged 4 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions client/api-docs/frequency-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,29 @@ <h3 class="md-4">
<a href="#parameters" class="text-body">
<h4 class="mt-4 md-2" id="parameters">Parameters</h4>
</a>
<p>
At least one of <code>subcategory</code> and <code>alternateSubcategory</code> must be specified; otherwise, an empty
array is returned.
</p>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<div>
<code>subcategory</code><code class="text-muted">: string</code>
<code class="text-muted float-end fw-semibold text-decoration-underline">required</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The subcategory to get the list for. If this is specified along with <code>alternateSubcategory</code>,
questions matching both fields are included.
</div>
</li>
<li class="list-group-item">
<div>
<code>alternateubcategory</code><code class="text-muted">: string</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The subcategory to get the list for.
The alternate subcategory to get the list for. If this is specified along with <code>subcategory</code>,
questions matching both fields are included.
</div>
</li>
<li class="list-group-item">
Expand All @@ -168,6 +183,20 @@ <h4 class="mt-4 md-2" id="parameters">Parameters</h4>
The maximum number of answers to return.
</div>
</li>
<li class="list-group-item">
<div>
<code>questionType</code><code class="text-muted">: "tossup" | "bonus" | "all"</code>
<code class="text-muted float-end fw-semibold">default: "all"</code>
</div>
<div>
The type of question to search for.
<ul>
<li><code>"tossup"</code> - only tossups</li>
<li><code>"bonus"</code> - only bonuses</li>
<li><code>"all"</code> - both tossups and bonuses</li>
</ul>
</div>
</li>
</ul>

<a href="#returns" class="text-body">
Expand Down
59 changes: 47 additions & 12 deletions client/api-docs/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ <h4 class="mt-4 md-2" id="parameters">Parameters</h4>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>caseSensitive</code><code class="text-muted">: boolean</code>
<code class="text-muted float-end fw-semibold">default: false</code>
</div>
<div>
Whether or not the search is case-sensitive.
</div>
</li>
<li class="list-group-item">
<div>
<code>exactPhrase</code><code class="text-muted">: boolean</code>
Expand Down Expand Up @@ -261,10 +270,9 @@ <h4 class="mt-4 md-2" id="parameters">Parameters</h4>
The categories to search for.
<ul>
<li>To pass multiple categories, separate values by a comma.</li>
<li>If <code>undefined</code> then all categories are allowed.</li>
<li>If <code>undefined</code> then all categories are allowed / match this field.</li>
<li>Can also be a <code>string</code> if there is only 1 category.</li>
<li>Take special care to ensure that the first letter of each word of the category is
capitalized.</li>
<li>Take special care to ensure that the first letter of each word of each category is capitalized.</li>
</ul>
</div>
</li>
Expand All @@ -274,20 +282,47 @@ <h4 class="mt-4 md-2" id="parameters">Parameters</h4>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The subcategories to search for.
The subcategories to search for. All of the bullet points above apply here, plus:
<ul>
<li>To pass multiple subcategories, separate values by a comma.</li>
<li>If <code>undefined</code> then all subcategories are allowed.</li>
<li>Can also be a <code>string</code> if there is only 1 subcategory.</li>
<li>Take special care to ensure that the first letter of each word of the subcategory is
capitalized.</li>
<li>This API endpoint does <b>not</b> check for consistency between categories and
subcategories.</li>
<li><i>For example, requesting the <code>"History"</code> and the <code>"Biology"</code>
<li>
This endpoint returns all questions that match both the <code>categories</code> AND
<code>subcategories</code> field.
</li>
<li>This API endpoint does <b>not</b> check for consistency between categories and subcategories.</li>
<li><i>For example, requesting the <code>"History"</code> category and the <code>"Biology"</code>
and <code>"Chemistry"</code> subcategories will return no questions.</i></li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>alternateSubcategories</code><code class="text-muted">: string | string[]</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The alternate subcategories to search for. All of the bullet points above apply here, plus:
<ul>
<li>
This endpoint returns all questions that match the <code>categories</code> AND
<code>subcategories</code> AND <code>alternateSubcategories</code> fields.
</li>
<li>
This endpoint does <b>not</b> check for consistency between categories and subcategories and alternate
subcategories.
</li>
<li>
Categories or subcategories that do not have corresponding alternate subcategories can never be
excluded by specifying values for <code>alternateSubcategories</code>.
</li>
<li>
<i>For example, requesting the <code>"Science"</code> category and the <code>"Biology"</code>
and <code>"Other Science"</code> subcategories and the <code>"Math"</code> alternate subcategory
will return questions in both Biology and Math, since Biology questions don't have alternate
subcategories.</i>
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>maxReturnLength</code><code class="text-muted">: number</code>
Expand Down
54 changes: 41 additions & 13 deletions client/api-docs/random-bonus.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,38 +155,66 @@ <h4 class="mt-4 md-2" id="parameters">Parameters</h4>
</li>
<li class="list-group-item">
<div>
<code>categories</code><code class="text-muted">: string[] | string</code>
<code>categories</code><code class="text-muted">: string | string[]</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The categories to search for.
<ul>
<li>If <code>undefined</code> then all categories are allowed.</li>
<li>To pass multiple categories, separate values by a comma.</li>
<li>If <code>undefined</code> then all categories are allowed / match this field.</li>
<li>Can also be a <code>string</code> if there is only 1 category.</li>
<li>Take special care to ensure that the first letter of each word of the category is
capitalized.</li>
<li>Take special care to ensure that the first letter of each word of each category is capitalized.</li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>subcategories</code><code class="text-muted">: string[] | string</code>
<code>subcategories</code><code class="text-muted">: string | string[]</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The subcategories to search for.
The subcategories to search for. All of the bullet points above apply here, plus:
<ul>
<li>If <code>undefined</code> then all subcategories are allowed.</li>
<li>Can also be a <code>string</code> if there is only 1 subcategory.</li>
<li>Take special care to ensure that the first letter of each word of the subcategory is
capitalized.</li>
<li>This API endpoint does <b>not</b> check for consistency between categories and
subcategories.</li>
<li><i>For example, requesting the <code>"History"</code> and the <code>"Biology"</code>
<li>
This endpoint returns all questions that match both the <code>categories</code> AND
<code>subcategories</code> field.
</li>
<li>This API endpoint does <b>not</b> check for consistency between categories and subcategories.</li>
<li><i>For example, requesting the <code>"History"</code> category and the <code>"Biology"</code>
and <code>"Chemistry"</code> subcategories will return no questions.</i></li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>alternateSubcategories</code><code class="text-muted">: string | string[]</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The alternate subcategories to search for. All of the bullet points above apply here, plus:
<ul>
<li>
This endpoint returns all questions that match the <code>categories</code> AND
<code>subcategories</code> AND <code>alternateSubcategories</code> fields.
</li>
<li>
This endpoint does <b>not</b> check for consistency between categories and subcategories and alternate
subcategories.
</li>
<li>
Categories or subcategories that do not have corresponding alternate subcategories can never be
excluded by specifying values for <code>alternateSubcategories</code>.
</li>
<li>
<i>For example, requesting the <code>"Science"</code> category and the <code>"Biology"</code>
and <code>"Other Science"</code> subcategories and the <code>"Math"</code> alternate subcategory
will return questions in both Biology and Math, since Biology questions don't have alternate
subcategories.</i>
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>number</code><code class="text-muted">: number</code>
Expand Down
54 changes: 41 additions & 13 deletions client/api-docs/random-tossup.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,38 +155,66 @@ <h4 class="mt-4 md-2" id="parameters">Parameters</h4>
</li>
<li class="list-group-item">
<div>
<code>categories</code><code class="text-muted">: string[] | string</code>
<code>categories</code><code class="text-muted">: string | string[]</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The categories to search for.
<ul>
<li>If <code>undefined</code> then all categories are allowed.</li>
<li>To pass multiple categories, separate values by a comma.</li>
<li>If <code>undefined</code> then all categories are allowed / match this field.</li>
<li>Can also be a <code>string</code> if there is only 1 category.</li>
<li>Take special care to ensure that the first letter of each word of the category is
capitalized.</li>
<li>Take special care to ensure that the first letter of each word of each category is capitalized.</li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>subcategories</code><code class="text-muted">: string[] | string</code>
<code>subcategories</code><code class="text-muted">: string | string[]</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The subcategories to search for.
The subcategories to search for. All of the bullet points above apply here, plus:
<ul>
<li>If <code>undefined</code> then all subcategories are allowed.</li>
<li>Can also be a <code>string</code> if there is only 1 subcategory.</li>
<li>Take special care to ensure that the first letter of each word of the subcategory is
capitalized.</li>
<li>This API endpoint does <b>not</b> check for consistency between categories and
subcategories.</li>
<li><i>For example, requesting the <code>"History"</code> and the <code>"Biology"</code>
<li>
This endpoint returns all questions that match both the <code>categories</code> AND
<code>subcategories</code> field.
</li>
<li>This API endpoint does <b>not</b> check for consistency between categories and subcategories.</li>
<li><i>For example, requesting the <code>"History"</code> category and the <code>"Biology"</code>
and <code>"Chemistry"</code> subcategories will return no questions.</i></li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>alternateSubcategories</code><code class="text-muted">: string | string[]</code>
<code class="text-muted float-end fw-semibold">default: undefined</code>
</div>
<div>
The alternate subcategories to search for. All of the bullet points above apply here, plus:
<ul>
<li>
This endpoint returns all questions that match the <code>categories</code> AND
<code>subcategories</code> AND <code>alternateSubcategories</code> fields.
</li>
<li>
This endpoint does <b>not</b> check for consistency between categories and subcategories and alternate
subcategories.
</li>
<li>
Categories or subcategories that do not have corresponding alternate subcategories can never be
excluded by specifying values for <code>alternateSubcategories</code>.
</li>
<li>
<i>For example, requesting the <code>"Science"</code> category and the <code>"Biology"</code>
and <code>"Other Science"</code> subcategories and the <code>"Math"</code> alternate subcategory
will return questions in both Biology and Math, since Biology questions don't have alternate
subcategories.</i>
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<div>
<code>number</code><code class="text-muted">: number</code>
Expand Down
Loading
Loading