Skip to content

About

a small C# CLI for fetching and displaying random cat facts

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

CatFactCLI

a small C# CLI for fetching random cat facts because apparently i needed a program dedicated to cats (i luv and hate cats)

About

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

Features

  • 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

Commands

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

Requirements

  • .NET

Running

make sure you have the .NET SDK installed, then run:

dotnet run

API

this project uses the Cat Facts API.

Purpose

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!

License

See LICENSE.

About

a small C# CLI for fetching and displaying random cat facts

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages