Skip to content

AbnerSquared/OpenTDB.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTDB.Net

NuGet

An API wrapper for OpenTDB, written in C#.

Usage

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.

Example

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.