Skip to content

janniksam/Akinator.Api.Net

Repository files navigation

Akinator Api for .NET

This is an improved async version of the Akinator Api, written for .NET Standard 1.4 and .NET 2.0

Build status master NuGet version

Languages

As of April 2020, 16 languages are supported by the Api-Client:

  • Arabic
  • Chinese
  • Dutch
  • English
  • French
  • German
  • Indonesian
  • Israeli
  • Italian
  • Japanese
  • Korean
  • Polski
  • Portuguese
  • Russian
  • Spanish
  • Turkish

Further more there are five different server types to choose from. Not every language does support every server type:

  • Person
  • Animal
  • Object
  • Movie
  • Place

Other languages and server-types will be added, as soon as Akinator is starting to support them.

Basic usage

// We will search for a german person server to play on.
var serverLocator = new AkinatorServerLocator(); 
var server = await serverLocator.SearchAsync(Language.German, ServerType.Person);

using (var client = new AkinatorClient(server))
{
   // Start a new game
   var question = await client.StartNewGame(); 
   
   // Process question...
   // ...
   
   // Answer the previous question with "Yes" and get the next one
   var question = await client.Answer(AnswerOptions.Yes);
   
   // if Akinator is due to guess...
   if (client.GuessIsDue())
   {
      // Get Akinators guess..
      var guess = await client.GetGuess();
      // Verify the guess ...
   }
}

Releases

No releases published

Packages

No packages published

Languages