LQ.EightBallApiWrapper
1.2.0
See the version list below for details.
dotnet add package LQ.EightBallApiWrapper --version 1.2.0
NuGet\Install-Package LQ.EightBallApiWrapper -Version 1.2.0
<PackageReference Include="LQ.EightBallApiWrapper" Version="1.2.0" />
paket add LQ.EightBallApiWrapper --version 1.2.0
#r "nuget: LQ.EightBallApiWrapper, 1.2.0"
// Install LQ.EightBallApiWrapper as a Cake Addin #addin nuget:?package=LQ.EightBallApiWrapper&version=1.2.0 // Install LQ.EightBallApiWrapper as a Cake Tool #tool nuget:?package=LQ.EightBallApiWrapper&version=1.2.0
Eight Ball Api Wrapper
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:
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 | Versions 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. |
-
.NETCoreApp 3.1
- Newtonsoft.Json (>= 12.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
I took out the unnecessary (imo) middle "magic" object, it is now easier to access the answer, question, and type properties!