a small C# CLI for fetching random cat facts because apparently i needed a program dedicated to cats (i luv and hate cats)
basically, i made this as a small C# project to practice consuming HTTP APIs, working with JSON responses, using query parameters, and structuring a simple CLI application
it uses the Cat Facts API to fetch random cat facts, with an option for shorter facts too
the API responses are deserialized into strongly typed C# models, and the CLI also has input validation and HTTP response handling
- fetch random cat facts
- fetch short cat facts
- deserialize API responses into strongly typed C# models
- simple interactive CLI
- generic numeric input handling
- input range validation
- HTTP response validation
| Option | Description |
|---|---|
1. Fact |
Get a random cat fact |
2. Short Fact |
Get a random short cat fact |
3. Help |
Display available commands |
4. Exit |
Exit the application |
- .NET
make sure you have the .NET SDK installed, then run:
dotnet runthis project uses the Cat Facts API.
i made CatFactCLI as a small project for learning how to consume HTTP APIs in C#, work with JSON responses, use query parameters, and structure a simple CLI application!
See LICENSE.