get-full-year 🦀
An unofficial Rust client for getfullyear.com that helps you get the full year. Because sometimes you just need to know what year it is, and you need to know it properly.
🚀 Features
- Written in Rust with type safety
- Async API powered by
reqwestandtokio - Clean and simple design
- Handles errors gracefully
- Includes comprehensive documentation
📦 Installation
Add the following to your Cargo.toml:
[]
= "1.0.0"
🔨 Usage
Basic Example
use get_full_year;
async
Enterprise Mode
use get_full_year;
async
🔍 API Reference
get_full_year(is_enterprise: bool) -> Result<YearResponseDTO, Box<dyn Error>>
Makes a sophisticated request to getfullyear.com to fetch the current year data.
Parameters:
is_enterprise(required): bool- Enables enterprise mode, suppressing sponsorship messages.
Returns:
Ok(YearResponseDTO): The current year data.Err(Box<dyn Error>): If an error occurs during the request.
Example
let data = get_full_year.await?;
println!;
Data Structure
- YearResponseDTO
- YearFetchingError
A custom error type that encapsulates errors occurring during the year-fetching process.
🏗️ Project Structure
get-full-year-rs/
├── src/ # Source code
│ ├── dto.rs # Data structures
│ ├── errors.rs # Error handling
│ ├── services.rs # Business logic
│ └── lib.rs # Library entry point
├── Cargo.toml # Crate metadata
└── README.md # Documentation
🛠️ Development
Clone the repository and run the following command to install dependencies:
git clone https://github.com/yourusername/get-full-year-rs.git
cd get-full-year-rs
Build the project:
Run the tests:
Run the project:
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
👤 Author
- Name: Naveen MC
- Email: me@mcnaveen.com
- GitHub: @mcnaveen
🙏 Acknowledgments
- Thanks to getfullyear.com for providing this essential service
- The Rust community for making Rust awesome
- The open-source community for continuous inspiration
📊 Stats
Made with ❤️ and probably not coffee ☕️