An API wrapper for OpenTDB, written in C#.
This API uses a disposable class called TdbClient
. This client stores all unique methods that can be called. You can request the count of a trivia category, request session tokens, questions, and global question counts.
This is an example that uses the TdbClient
to request questions.
public async Task MethodAsync()
{
using (TdbClient client = new TdbClient())
{
List<TriviaQuestion> questions = await client.GetQuestionsAsync(10);
}
}
It is recommended that you use a single instance of a TdbClient
class, although quick disposable usage is supported.