{ "reqId": 15992865229850270, "code": 10000, "msg": "成功", "data": { "chinaTotal": { "today": { "confirm": 23, "suspect": null, "heal": 46, "dead": 0, "severe": null, "storeConfirm": -23, "input": 10 }, "total": { "confirm": 90498, "suspect": 0, "heal": 85257, "dead": 4735, "severe": 0, "input": 2563 }, "extData": { "noSymptom": 338, "incrNoSymptom": 8 } }, "chinaDayList": [{ "date": "2020-01-13", "today": { "confirm": 0, "suspect": 0, "heal": 0, "dead": 0, "severe": null, "storeConfirm": 0, "input": 0 }, "total": { "confirm": 41, "suspect": 0, "heal": 0, "dead": 1, "severe": null, "input": 0, "storeConfirm": 0 }, "extData": null, "lastUpdateTime": null }, { "date": "2020-01-14", "today": { "confirm": 0, "suspect": 0, "heal": 0, "dead": 0, "severe": null, "storeConfirm": 0, "input": 0 }, "total": { "confirm": 41, "suspect": 0, "heal": 0, "dead": 1, "severe": null, "input": 0, "storeConfirm": 0 }, "extData": null, "lastUpdateTime": null }] }, "timestamp": 1599286522985 }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2020/09/05 16:46 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://c.m.163.com/ug/api/wuhan/app/data/list-total'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://c.m.163.com/ug/api/wuhan/app/data/list-total" ) func main() { queryUrl := fmt.Sprintf("%s",APIURL) resp, err := http.Get(queryUrl) if err != nil { log.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }