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-gjjifhqt3mv.n.bdcloudapi.com/huangli/date"; ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.GET, path); request.setCredentials("您的 access key", "您的 secret key"); request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8"); request.addQueryParameter("year", ""); 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": {
"year": "2015",
"month": "10",
"day": "27",
"yangli": "公元2015年10月27日",
"nongli": "农历二〇一五年九月十五",
"star": "天蝎座",
"taishen": "厨灶碓外西南",
"wuxing": "涧下水",
"chong": "冲(庚午)马",
"sha": "煞南",
"shengxiao": "羊",
"jiri": "天牢(黑道)满日",
"zhiri": "天牢(黑道凶日)",
"xiongshen": "灾煞 天火 大煞 归忌 天牢 触水龙",
"jishenyiqu": "天德 月德 时德 福德 民日 天巫 普护 鸣犬对",
"caishen": "西南",
"xishen": "西南",
"fushen": "正东",
"suici": [
"乙未年",
"丙戌月",
"丙子日"
],
"yi": [
"纳采",
"成服"
],
"ji": [
"入宅",
"上梁",
"谢土"
],
"eweek": "TUESDAY",
"emonth": "October",
"week": "二"
}
}
退款规则:
退款时仅退还实付金额,已使用的代金券不退还。
已经开具完发票的,退款时需要您退回发票。
订单支付完成后7天内为交易担保期,可免费申请退款。
超过7天的订单需退款的请先联系客服退款。需收取资源包余量的15%作为财务成本支出,退余量的85%。
如对退款有疑问,请先联系客服进行咨询。详情参考云市场退款规则:
https://cloud.baidu.com/doc/Market/s/zjwvytb6s
按年月日查询农历、星座、生肖、胎神、喜神、五行、冲、煞、吉日、值日天神、凶神、吉神宜趋、财神、喜神、福神、岁次、宜、忌、星期等黄历信息,数据范围1900-2100年。