getLangs function
Implementation
Future getLangs() async {
var data =
await fetchEndpoint('community/misc/wapi/langs', chinese: false, kwargs: {
'params': {
'gids': 2,
},
});
var results = {};
var langs = data['langs'] ?? [];
for (var i = 0; i < langs.length; i++) {
var lang = langs[i];
results[lang['value']] = lang['name'];
}
return results;
}