RepoList: Parse more information

This way in the future we can make the repo list a bit prettier. It
currently looks quite ugly.
This commit is contained in:
Vishesh Handa
2020-09-03 20:54:46 +02:00
parent b96513b25f
commit e4fd84d4a4
3 changed files with 62 additions and 6 deletions

View File

@ -217,10 +217,26 @@ class GitHub implements GitHost {
} catch (e) {
Log.e(e);
}
var licenseMap = parsedJson['license'];
/*
print("");
parsedJson.forEach((key, value) => print(" $key: $value"));
print("");
*/
return GitHostRepo(
fullName: parsedJson['full_name'],
cloneUrl: parsedJson['ssh_url'],
updatedAt: updatedAt,
description: parsedJson['description'],
stars: parsedJson['stargazers_count'],
forks: parsedJson['forks_count'],
issues: parsedJson['open_issues_count'],
language: parsedJson['language'],
private: parsedJson['private'],
tags: parsedJson['topics'],
license: licenseMap != null ? licenseMap['spdx_id'] : null,
);
}