- A haxelib to interact with the Github API
Run:
haxelib git hxgitapi https://github.com/yophlox/hxgitapi.git
import hxgitapi.API;
import hxgitapi.util.User;
var api = new API();
var username = "yophlox";
var user = api.getUser(username);
if (user != null) {
trace('User details for $username:');
trace('Avatar URL: ${user.avatarUrl}');
trace('Name: ${user.name != null ? user.name : "Not available"}');
trace('Email: ${user.email != null ? user.email : "Not available"}');
trace('Followers: ${user.followers}');
trace('Following: ${user.following}');
trace('Public Repos: ${user.publicRepos}');
trace('Public Gists: ${user.publicGists}');
trace('Created At: ${user.createdAt}');
trace('Updated At: ${user.updatedAt}');
} else {
trace('Failed to fetch user data for $username');
}
- YoPhlox - haxelib :D
- Github - API
- GuineaPigUuhh - referenced some code, also inspired me to make this