17 lines
333 B
C
Raw Normal View History

2025-03-22 02:15:49 +00:00
#include "browse.h"
2025-04-03 03:26:11 +00:00
#include <stdio.h>
#include <stdlib.h>
2025-03-22 02:15:49 +00:00
int main() {
2025-03-28 05:56:36 +00:00
char *query = "example";
char *result = get_news(query);
2025-03-22 02:15:49 +00:00
2025-03-28 05:56:36 +00:00
if (result) {
printf("Result: %s\n", result);
free(result); // Free the allocated memory for the result
} else {
2025-04-03 03:26:11 +00:00
fprintf(stderr, "Error: Failed to fetch news.\n");
2025-03-28 05:56:36 +00:00
}
return 0;
2025-03-22 02:15:49 +00:00
}