DecisionRules 1.4.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package DecisionRules --version 1.4.2                
NuGet\Install-Package DecisionRules -Version 1.4.2                
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="DecisionRules" Version="1.4.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DecisionRules --version 1.4.2                
#r "nuget: DecisionRules, 1.4.2"                
#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 DecisionRules as a Cake Addin
#addin nuget:?package=DecisionRules&version=1.4.2

// Install DecisionRules as a Cake Tool
#tool nuget:?package=DecisionRules&version=1.4.2                

Simple library that allows you to easily connect to Decisionrules.io from your application.

Arguments

  • U - generic return type
  • T - generic input argument
  • API_KEY - Your API_KEY (string)
  • Geolocation - optional argument. If omited default geoloc is set. Our geolocs (string)
  • JsonStringInput - input model in json string format instead of T type. (string)
  • Version - optional parameter that defines which version of rule you want use in solver API. If omited last version is used. (string)

Usage

namespace DemoApp
{
    class Program
    {

        private static readonly string apiKey = "API_KEY_HERE";

        private static readonly string ruleId = "RULE_ID_HERE";

        static void Main(string[] args)
        {

            RequestOption requestOptions = new RequestOption(apiKey, GeoLocations.DEFAULT);

            DecisionRulesService drs = new DecisionRulesService(requestOptions);

            InputData inputModel = new InputData
            {
                day = "today"
            };

            string inputJSON = @"{""data"": {""day"":""today""}}";

            List<ResultModel> response = drs.Solve<InputData, ResultModel>(ruleId, inputModel, SolverStrategies.STANDARD, "VERSION_HERE").Result;

            List<ResultModel> responseString = drs.Solve<ResultModel>(ruleId, inputJSON, SolverStrategies.STANDARD, "VERSION_HERE").Result;

            Console.WriteLine(response[0].result);
            Console.WriteLine(responseString[0].result);
        }
    }

}

InputModel preview example

class InputModel
{
    public string day { get; set; }
}

ResultModel preview example

class ResultModel
{
    public string result { get; set; }
}
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.
  • .NETCoreApp 3.1

    • No dependencies.

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
3.0.6 19,037 7/22/2022
3.0.5 427 7/22/2022
3.0.4 478 6/27/2022
3.0.3 427 6/15/2022
3.0.2 431 6/6/2022
3.0.0 427 5/6/2022
2.0.1 472 1/24/2022
2.0.0 319 10/8/2021
1.6.5 290 9/23/2021
1.6.3 462 1/24/2022
1.5.3 332 8/3/2021
1.5.1 333 7/26/2021
1.4.2 337 6/28/2021