OrangeParanoia 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OrangeParanoia --version 1.2.0
                    
NuGet\Install-Package OrangeParanoia -Version 1.2.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="OrangeParanoia" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OrangeParanoia" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="OrangeParanoia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OrangeParanoia --version 1.2.0
                    
#r "nuget: OrangeParanoia, 1.2.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.
#addin nuget:?package=OrangeParanoia&version=1.2.0
                    
Install OrangeParanoia as a Cake Addin
#tool nuget:?package=OrangeParanoia&version=1.2.0
                    
Install OrangeParanoia as a Cake Tool

Orange Paranoia API

Orange Paranoia is a versatile API and NuGet package that provides random information on a wide variety of topics. Whether you need basic random values (such as numbers, dates, and strings) or complete/partial data models�with both completely random data and logically related parameters�this project has you covered.


Table of Contents


Overview

The Orange Paranoia API exposes several endpoint groups, each providing a specific set of functionalities for generating random data. These endpoints are organized to make it easy to request the type of data you need.


Endpoint Groups

Answers

Endpoints in the Answers group generate random responses for decision-making and fun queries.

  • GET /answer/magic8ball
    Returns a random Magic 8-Ball style answer as plain text.

  • GET /answer/yesno
    Returns a random Yes/No answer as plain text.

  • GET /answer/truefalse
    Returns a random True/False answer as plain text.


Cards

Endpoints in the Cards group generate random card selections from various decks.

  • GET /card/tarot
    Returns a list of randomly selected Tarot cards (including the card number and name) in English.
    Query Parameter:

    • count (integer): Number of cards to return (minimum 1, maximum is the deck size).
  • GET /card/poker
    Returns a list of randomly selected Poker cards in English.
    Query Parameter:

    • count (integer): Number of cards to return (minimum 1, maximum is the deck size).
  • GET /card/spanish
    Returns a list of randomly selected Spanish deck cards in Spanish.
    Query Parameter:

    • count (integer): Number of cards to return (minimum 1, maximum is the deck size).

Numbers

Endpoints in the Numbers group generate random numerical values of different types, such as integers, decimals, doubles, and floats. You can also generate random decimals within a specified range and precision.

  • GET /number/random/int: Returns a random integer. Optionally accepts minimum and maximum values.
  • GET /number/random/decimal: Returns a random decimal number. Optionally accepts minimum and maximum values.
  • GET /number/random/double: Returns a random double. Optionally accepts minimum and maximum values.
  • GET /number/random/float: Returns a random float. Optionally accepts minimum and maximum values.
  • GET /number/random/decimal-range: Returns a random decimal number within a specified range with configurable precision. Query parameters include min, max, and decimals.

Dates

Endpoints in the Dates group provide random date and time values. They are divided into subgroups for dates, times, and date-times, and support optional format masks to customize the output.

  • GET /date/future: Returns a random future date. Accepts an optional format mask (default: "yyyy-MM-dd").
  • GET /date/past: Returns a random past date. Accepts an optional format mask.
  • GET /time/future: Returns a random future time. Accepts an optional format mask (default: "HH:mm:ss").
  • GET /time/past: Returns a random past time. Accepts an optional format mask.
  • GET /datetime/future: Returns a random future date-time. Accepts an optional format mask (default: universal sortable pattern).
  • GET /datetime/past: Returns a random past date-time. Accepts an optional format mask.

Each endpoint validates the provided format mask and returns an error if the mask is invalid.


Progressions

The Progressions group provides endpoints for generating various numerical sequences and mathematical progressions. These endpoints use memoization and can handle complex calculations.

  • GET /progression/fibonacci: Returns the Fibonacci number for the given input.
  • GET /progression/jacobsthal: Returns the Jacobsthal number for the given input.
  • GET /progression/lucas: Returns the Lucas number for the given input.
  • GET /progression/pell: Returns the Pell number for the given input.
  • GET /progression/hofstadterq: Returns the Hofstadter Q number for the given input.
  • GET /progression/logisticmap: Returns a value from the logistic map function after n iterations.
  • GET /progression/exotic: Returns the value of an "exotic" progression for the given input.

These endpoints allow you to explore different mathematical sequences and understand their behavior with random input parameters.


Utility

The Utility group includes endpoints for generating random color values in various formats, which are useful for web development and design.

  • GET /utility/hexcolor: Returns a random hex color based on an input string.
  • GET /utility/hexcolor2: Returns another variant of a random hex color using a different hash algorithm.
  • GET /utility/rgbcolor: Returns a random RGB color value.
  • GET /utility/rgba: Returns a random RGBA color value. Accepts an optional alpha parameter for opacity.

These endpoints leverage different hashing methods to generate consistent and random color values.


Arrays

The Arrays group provides an endpoint to select a random element from an array. This is useful when you need to pick a random item from a list of items.

  • POST /array/random:
    Accepts an array of elements (e.g., strings) in the request body and returns one randomly selected element. If the array is empty or null, it returns a default value.

Usage

To use the API, simply call the desired endpoint using your preferred HTTP client (e.g., Postman, curl, or directly through a browser for GET requests). Each endpoint is documented in Swagger, where you can also see the available query parameters and expected responses.

The API groups endpoints by functionality, making it easy to find and integrate the features you need into your project.


License

This project is licensed under The Unlicense.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • 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
1.2.1 53 5/17/2025
1.2.0 132 4/30/2025
1.0.1 83 4/26/2025
1.0.0 105 4/26/2025 1.0.0 is deprecated because it has critical bugs.