A lightweight C library for fetching the current year from getfullyear.com. Because sometimes, you need to get the full year properly, with all the bells and whistles.
- Simple and intuitive API
- Minimal dependencies (uses
libcurl
for HTTP requests) - Modular design
- Enterprise mode support
- Full control over memory management
- A C compiler (GCC, Clang, etc.)
libcurl
installed on your system
- Clone the repository:
git clone https://github.com/yourusername/get-full-year-c.git
cd get-full-year-c
- Compile the library:
gcc -o getfullyear main.c getfullyear.c -lcurl
- Include the getfullyear.h header in your C project.
#include "getfullyear.h"
#include <stdio.h>
int main() {
// Fetch the year data in standard mode
YearResponseDTO *yearData = getFullYear(false);
if (yearData) {
printf("Year: %d\n", yearData->year);
printf("Sponsored By: %s\n", yearData->sponsored_by);
printf("Metadata: %s\n", yearData->metadata);
// Free memory after use
freeYearResponseDTO(yearData);
} else {
printf("Failed to fetch year data\n");
}
return 0;
}
π Initiating year acquisition process in STANDARD mode...
π‘ Establishing connection to temporal data service at https://getfullyear.com/api/year
β
HTTP response received. Parsing...
β¨ Sponsored by our magnificent partner: Mock Sponsor
β
Year acquisition completed successfully
Year: 2025
Sponsored By: Mock Sponsor
Metadata: {"year":2025,"sponsored_by":"Mock Sponsor"}