Network component of the covid-19 visualizer.
This library was built to be a module of the Processing language.
VirusService service = VirusServices.create();
一切网络操作都需要通过 service
进行
Day day = service.today().execute().body();
样例 | 返回类型 | 用途 |
---|---|---|
day.getCountry() |
String | 数据来源国家。如果为全球数据,返回值为 null |
day.isGlobal() |
boolean | 判断该数据是否是全球数据 |
day.getDate() |
Date | 数据的日期 |
day.getConfirmed() |
int | 累计确诊人数 |
day.getDeaths() |
int | 累计死亡人数 |
day.getRecorvered() |
int | 累计治愈人数 |
List<Day> days = service.allDays().execute().body();
List<Day> days = service.country("国家名").execute().body();
List<Day> days = service.allCountries().execute().body();
We would like to thank JetBrains for sharing free open-source licences of amazing tools such as Intellij IDEA.
- Data Source: (covid-19api.com)[http://covid-19api.com/]