android - 使用 volley 和 json 未提供的图像解析 json
问题描述
以下是我的 APi 回复
我想使用此 api 中未提供的标志图像获取所有详细信息,我该怎么做?请帮助我,我正在制作大学项目
"matches": [
{
"unique_id": 1144995,
"date": "2018-12-25T00:00:00.000Z",
"dateTimeGMT": "2018-12-25T23:30:00.000Z",
"team-1": "Australia",
"team-2": "India",
"type": "Test",
"squad": true,
"toss_winner_team": "India",
"winner_team": "India",
"matchStarted": true
},
{
"unique_id": 1153839,
"date": "2018-12-25T00:00:00.000Z",
"dateTimeGMT": "2018-12-25T22:00:00.000Z",
"team-1": "New Zealand",
"team-2": "Sri Lanka",
"type": "Test",
"squad": true,
"toss_winner_team": "Sri Lanka",
"winner_team": "New Zealand",
"matchStarted": true
},
{
"unique_id": 1144153,
"team-2": "Pakistan",
"team-1": "South Africa",
"type": "Test",
"date": "2018-12-26T00:00:00.000Z",
"dateTimeGMT": "2018-12-26T08:00:00.000Z",
"squad": true,
"toss_winner_team": "Pakistan",
"winner_team": "South Africa",
"matchStarted": true
}]
解决方案
如果您想从国家/地区名称中获取国家/地区图像,则可以使用此 api 并将flag_base64键用作国家/地区标志网址。
https://raw.githubusercontent.com/samayo/country-json/master/src/country-by-flag.json
推荐阅读
- php - 可变金额的 PayPal 付款按钮
- swift5 - 导航回特定的视图控制器类
- vimeo - Vimeo 上传错误
- reactjs - material-ui CSS 已应用,但在 DOM 中找不到
- javascript - 我可以在 react-native-web 应用程序中使用什么支持 flexbox 的抽屉来替换 @react-navigation/drawer?
- c++ - 为什么 c++11 std::lock 和 std::scoped_lock 至少需要 2 个参数?
- keras - 如何在训练期间的每个时期后计算多类分类问题的精度和召回率?
- ios - Alamofire 5:EXC_BAD_ACCESS
- sparklyr - 使用 sparklyr 添加其他 kafka 消费者设置
- python - 根据 pandas 中的今天日期(今天或之前)过滤数据框