Table of Contents

Class ApiConstants

Namespace
Tudormobile.OpenTrivia
Assembly
Tudormobile.OpenTrivia.dll

Contains constants for the Open Trivia API.

public static class ApiConstants
Inheritance
ApiConstants
Inherited Members

Fields

ApiRevision

The API version currently in use.

public const int ApiRevision = 0

Field Value

int

BaseQuestionUrl

The base URL for the Open Trivia Database API.

public const string BaseQuestionUrl = "https://opentdb.com/api.php"

Field Value

string

CategoryUrl

The URL for retrieving trivia categories from the Open Trivia Database API.

public const string CategoryUrl = "https://opentdb.com/api_category.php"

Field Value

string

MaxAmount

The maximum number of questions that can be requested in a single API call.

public const int MaxAmount = 50

Field Value

int

QuestionCountUrl

The URL for retrieving the count of trivia questions from the Open Trivia Database API.

public const string QuestionCountUrl = "https://opentdb.com/api_count.php"

Field Value

string

RateLimitSeconds

Api rate limit in seconds. Each IP can only access the API once every 5 seconds.

public const int RateLimitSeconds = 5

Field Value

int

TokenUrl

The URL of the Open Trivia Database API token endpoint.

public const string TokenUrl = "https://opentdb.com/api_token.php"

Field Value

string