Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | User |
Structure representing a GitHub user. More... | |
Functions | |
User | fetch_github_user (const char *username) |
Fetch GitHub user information for a given username. | |
void | print_github_user (const User *user) |
Print GitHub user information to standard output. | |
void | user_free (User *user) |
Free dynamically allocated memory in a User structure. | |
User fetch_github_user | ( | const char * | username | ) |
Fetch GitHub user information for a given username.
username | GitHub username to fetch. |
The returned User must be freed with user_free().
Fetch GitHub user information for a given username.
username | GitHub username. |
The returned User must be freed using user_free().
Definition at line 130 of file user.c.
References buffer_cleanup(), buffer_init(), User::company, curl_easy_cleanup(), curl_easy_init(), curl_easy_perform(), curl_easy_setopt, curl_easy_strerror(), CURLE_OK, Buffer::data, error(), free, json_decref(), json_is_string, json_loads(), json_object_get(), json_string_value(), User::location, User::login, malloc, User::name, name, snprintf, and write_callback().
Referenced by main(), Test(), and user_handler().
void print_github_user | ( | const User * | user | ) |
Print GitHub user information to standard output.
user | Pointer to a User structure. |
Print GitHub user information to standard output.
user | Pointer to the User structure. |
Definition at line 230 of file user.c.
References User::company, User::location, User::login, User::name, and printf.
Referenced by BM_PrintUser(), and main().