LQ.EightBallApiWrapper 1.4.0

dotnet add package LQ.EightBallApiWrapper --version 1.4.0                
NuGet\Install-Package LQ.EightBallApiWrapper -Version 1.4.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LQ.EightBallApiWrapper" Version="1.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LQ.EightBallApiWrapper --version 1.4.0                
#r "nuget: LQ.EightBallApiWrapper, 1.4.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LQ.EightBallApiWrapper as a Cake Addin
#addin nuget:?package=LQ.EightBallApiWrapper&version=1.4.0

// Install LQ.EightBallApiWrapper as a Cake Tool
#tool nuget:?package=LQ.EightBallApiWrapper&version=1.4.0                

Eight Ball Api Wrapper

Eight Ball Picture

Don't want to write your own implementation of the 8Ball Delegator API? Want to simply instantiate an object that will do it for you? The 8Ball Delegator Wrapper is here! API Docs found here: https://8ball.delegator.com/

If you found this library particularly useful/helpful please consider supporting me:
ko-fi

Usage Example

From a synchronous function
using System;
using EightBallApiWrapper;

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            EightBall eightBall = new EightBall();
            var result = eightBall.AskQuestion("Should I make this totally financially irresponsible decision?");
            Console.WriteLine(result.Answer); // "Yes"
        }
    }
}
From an asynchronous function
using System;
using EightBallApiWrapper;

namespace Example
{
    public class CoolClass
    {
        public async void AskEightBallExample()
        {
            EightBall eightBall = new EightBall();
            var result = await eightBall.AskQuestionAsync("Should I make this totally financially irresponsible decision?");
            Console.WriteLine(result.Answer); // "Yes"
        }
    }
}

Resulting Class Structure:

Result: (object){
    Question: string //returns your initial question
    Answer: string //returns the answer to your yes/no question
    Type: string [ Affirmative, Contrary, Neutral ] //a string that will be either "Affirmative", "Contrary", or "Neutral" that denotes what kind of answer you received.
}

Benefits Of Using This Library:

Boils the process of writing the implementation of the Eight Ball Delegator API to 3 lines. Import. Instantiate. Ask.

As a side note, if you would like to support or contribute to the development of the library:

  • Feel free to fork the repo and PR back any additions
  • Contact me at aldmnatividad@gmail.com for any suggestions
  • Donate to my Ko-fi here (I do this in my free time so any donation you can give helps me develop more things like this!)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.0 658 2/17/2021
1.3.0 340 2/14/2021
1.2.0 352 2/13/2021
1.1.0 330 2/12/2021
1.0.1 363 2/10/2021
1.0.0 338 2/7/2021

Non-async functions make http requests again, now uses dynamic objects