https://github.com/tsjdev-apps/randomuser-sharp
A .NET client wrapper for https://randomuser.me written in .NET Standard
https://github.com/tsjdev-apps/randomuser-sharp
Last synced: 5 months ago
JSON representation
A .NET client wrapper for https://randomuser.me written in .NET Standard
- Host: GitHub
- URL: https://github.com/tsjdev-apps/randomuser-sharp
- Owner: tsjdev-apps
- License: mit
- Created: 2023-09-07T15:24:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T16:55:43.000Z (over 2 years ago)
- Last Synced: 2024-08-31T19:41:16.014Z (almost 2 years ago)
- Language: C#
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RandomUserSharp
A .NET client wrapper for http://randomuser.me written in .NET Standard 2.0
## Installation
Install the package via [NuGet](https://www.nuget.org/packages/RandomUserSharp).

## Usage
You can either create a new instance of `RandomUserSharpClient` or if you are using Dependency Injection there is also an interface called `IRandomUserSharpClient` which you can register in your container.
```csharp
Task> GetRandomUsersAsync();
```
The `RandomUserSharpClient` provides one method, called `GetRandomUsersAsync`, which has several optional parameters. The following table describes the parameters.
| **name** | **type** | **default value** | **description** |
|-|-|-|-|
| `count` | `int` | `1` | Indicates the amount of random users, which should be generated. |
| `gender` | `Gender` | `Both` | Indicates the gender of the generated persons. |
| `nationalities` | `List` | `null` | Indicates the nationalities of the users. |
| `useLegoImages` | `bool` | `false` | Indicates if the images should be *Lego* images. |
| `seed` | `string` | `null` | Indicates if you want generate the same set of users by using the same `seed`. |
| `passwordOptions` | `PasswordOptions` | `null` | Indicates how the passwords should be generated. |
## Sample
Here is a screenshot of the `Console Application` using the [NuGet package](https://www.nuget.org/packages/RandomUserSharp) to get some random users and display them in a table on the console.

## Buy Me A Coffee
I appreciate any form of support to keep my _Open Source_ activities going.
Whatever you decide, be it reading and sharing my blog posts, using my NuGet packages or buying me a coffee/book, thank you ❤️.
## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)