UINames.Net
1.0.0
See the version list below for details.
dotnet add package UINames.Net --version 1.0.0
NuGet\Install-Package UINames.Net -Version 1.0.0
<PackageReference Include="UINames.Net" Version="1.0.0" />
paket add UINames.Net --version 1.0.0
#r "nuget: UINames.Net, 1.0.0"
// Install UINames.Net as a Cake Addin
#addin nuget:?package=UINames.Net&version=1.0.0
// Install UINames.Net as a Cake Tool
#tool nuget:?package=UINames.Net&version=1.0.0
UINames.Net
Random name generator for the .NET-framework using the public and free API from uinames.com. This very small and basic library was written in vb.NET, mainly for studying reasons.
Usage
Classes and Enums
The model consists of the following classes and enums defining its base model:
1. Name (Class)
The basic name representation taken from uinames.com.
1.1 Members
1.1.1 Name: String
A person's first name.
1.1.2 Surname: String
A person's last name.
1.1.3 Gender: String
A person's gender.
1.1.4 Region: String
The region name a person is coming from.
2. Gender (Enum)
uinames.com does not provide other genders than female or male. Other genders will be represented as "not specified" in this library. This is not to be meant to be disrespectful to anyone identifying as any other gender than the conventional binary representation.
2.1 Values
- NotSpecified
- Female
- Male
Methods
This small library only exposes two methods to the public:
1. GetName(gender: Gender (optional, default: Gender.NotSpecified), region (optional, default: null): System.Globalization.RegionInfo, minLength (optional, nullable, default: null): Integer, maxLength (optional, nullable, default: null): Integer): Name
This method returns a single name from the API.
If a gender is specified, the name will be one of a person of the given gender, otherwise it will be random.
If the region is specified, the name will be one of a person coming from the given region, otherwise it will be random.
If the minLength is specified, the person's name will be at least as long as the given number, otherwise its minumum length will be zero.
If the maxLength is specified, the person's name will be at most as long as the given number, otherwise its maximum length will be unbounded.
2. GetNames(amount: Integer, gender: Gender (optional, default: Gender.NotSpecified), region (optional, default: null): System.Globalization.RegionInfo, minLength (optional, nullable, default: null): Integer, maxLength (optional, nullable, default: null): Integer): IEnumerable<Name>
This method returns an enumerable of a given length of names from the API.
The amount parameter specifies the number of names to be created. If the amount is smaller than 2 or greater than 500, an exception will be thrown. If the user wants a single name to be generated, the use of the GetName method is recommended. The upper bound is provided by the API itself.
If a gender is specified, the names will be ones of persons of the given gender, otherwise they will be random.
If the region is specified, the names will be one of persons coming from the given region, otherwise they will be random.
If the minLength is specified, the persons' names will be at least as long as the given number, otherwise their minumum length will be zero.
If the maxLength is specified, the persons' names will be at most as long as the given number, otherwise their maximum length will be unbounded.
Remarks
The API limits the users' requests to 7 requests per minute. A single request is limited to 500 names, so the API allows requesting 3,500 random names per minute.
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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 12.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.