editCurrentUser method
Updates the Current User.
API docs: https://developer.github.com/v3/users/#update-the-authenticated-user
Implementation
Future<CurrentUser> editCurrentUser(
{String? name,
String? email,
String? blog,
String? company,
String? location,
bool? hireable,
String? bio}) {
final map = createNonNullMap(<String, dynamic>{
'name': name,
'email': email,
'blog': blog,
'company': company,
'location': location,
'hireable': hireable,
'bio': bio
});
return github.postJSON(
'/user',
body: GitHubJson.encode(map),
statusCode: 200,
convert: CurrentUser.fromJson,
);
}