import com.baidubce.http.ApiExplorerClient; import com.baidubce.http.AppSigner; import com.baidubce.http.HttpMethodName; import com.baidubce.model.ApiExplorerRequest; import com.baidubce.model.ApiExplorerResponse; // 历史上的今天查询 Java示例代码 public class RequestDemo { public static void main(String[] args) { String path = "http://gwgp-xxjzfnuxixd.n.bdcloudapi.com/todayhistory/query"; ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.GET, path); request.setCredentials("您的 access key", "您的 secret key"); request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8"); request.addQueryParameter("month", ""); request.addQueryParameter("day", ""); ApiExplorerClient client = new ApiExplorerClient(new AppSigner()); try { ApiExplorerResponse response = client.sendRequest(request); // 返回结果格式为Json字符串 System.out.println(response.getResult()); } catch (Exception e) { e.printStackTrace(); } } }
点击复制代码
{
"status": 0,
"msg": "ok",
"result": [
{
"title": "日俄战争:驻守旅顺的俄军向日军投降。",
"year": "1905",
"month": "1",
"day": "2",
"content": "<p style="\"text-align:" center\"=""><img height="\"131\"" width="\"300\"" src="\"http://m.46644.com/todayhistory/upload/e791lishitupian.jpg\""></p><p> 1月2日。经过日军半年之久的围困进攻,阿那托利-斯托赛尔将军终于交出了旅顺港。今天下午4时30分,乃木希典将军在东京接受了斯托赛尔的投降书。日本天皇作出保证,所有的投降部队将受到人道的待遇。</p>"
},
{
"title": "意大利墨西拿发生地震,20万人丧生。 ",
"year": "1909",
"month": "1",
"day": "2",
"content": "<p style="\"text-align:" center\"=""><img height="\"194\"" width="\"300\"" src="\"http://m.46644.com/todayhistory/upload/c0b0lishitupian.jpg\""></p><p style="\"text-align:" center\"="">墨西拿人纷纷逃离家园</p><p> 1月2日。上星期一意大利南部发生地震,人们的恐惧不是没有理由的。这次地震使20多万人丧生。饥饿和肺炎会夺去更多人的生命。</p>"
}
]
}
退款规则:
退款时仅退还实付金额,已使用的代金券不退还。
已经开具完发票的,退款时需要您退回发票。
订单支付完成后7天内为交易担保期,可免费申请退款。
超过7天的订单需退款的请先联系客服退款。需收取资源包余量的15%作为财务成本支出,退余量的85%。
如对退款有疑问,请先联系客服进行咨询。详情参考云市场退款规则:
https://cloud.baidu.com/doc/Market/s/zjwvytb6s
历史上的指定日期发生的大事,包括重大事情、诞辰、逝世等图文详情,不断增加中