HOST地址: www.mxnzp.com/apijava
說明: 全部的接口都會返回以下格式的數據,具體數據包裝在data中,須要根據狀態來肯定請求是否成功。api
請求方法: 全部的請求都是GET請求網絡
數據返回格式:工具
{
"code": 1, "msg": "數據返回成功", "data": null } 複製代碼
數據返回格式說明(下面全部接口中的數據返回都是基於data的,再也不介紹code和msg,請知悉):ui
2018年12月14日15:02:00spa
2018年12月10日22:54:463d
2018年12月07日09:20:07code
2018年12月01日22:49:42視頻
2018年11月27日23:14:49接口
接口說明: 獲取指按期號的雙色球獲獎號碼信息
接口地址: [HOST]/lottery/ssq/aim_lottery?expect=2018135
參數說明: expect:彩票期號(七位)必傳
返回數據:
數據樣例:
{
"openCode": "01,03,06,10,11,29+16", "code": "ssq", "expect": "2018135", "name": "雙色球", "time": "2018-11-18 21:18:20" } 複製代碼
接口說明: 獲取最新雙色球中獎號碼信息
接口地址: [HOST]/lottery/ssq/latest
參數說明: 無
返回數據:
數據樣例:
{
"openCode": "10,12,15,25,26,27+14", "code": "ssq", "expect": "2018136", "name": "雙色球", "time": "2018-11-20 21:18:20" } 複製代碼
接口說明: 獲取最新雙色球中獎號碼信息
接口地址: [HOST]/lottery/ssq/lottery_list?page=1
參數說明: page 頁號
返回數據:
page: 當前頁數
totalCount: 總數量
totalPage: 總頁數
limit: 每頁數量
list: 每頁具體數據
數據樣例:
{
"page": 1, "totalCount": 903, "totalPage": 91, "limit": 10, "list": [ { "openCode": "10,12,15,25,26,27+14", "code": "ssq", "expect": "2018136", "name": "雙色球", "time": "2018-11-20 21:18:20" }, { "openCode": "01,03,06,10,11,29+16", "code": "ssq", "expect": "2018135", "name": "雙色球", "time": "2018-11-18 21:18:20" } ] } 複製代碼
2018-11-26 18:07:28更新: 節假日新增類型描述,好比【國慶,休息日,工做日】
接口說明: 獲取指定日期的節假日及萬年曆信息
接口地址: [HOST]/holiday/single/{date} 【例如: [HOST]/holiday/single/20181121】
參數說明: date 日期 格式 yyyyMMdd
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "date": "2018-11-25", "weekDay": 7, "yearTips": "戊戌", "type": 1, "chineseZodiac": "狗", "solarTerms": "小雪後", "typeDes" : "休息日", "avoid": "移徙.入宅.安門.做梁.安葬", "lunarCalendar": "10-18", "suit": "祭祀.祈福.求嗣.齋醮.沐浴.冠笄.出行.理髮.拆卸.解除.起基.動土.定磉.安碓磑.開池.掘井.掃舍.除服.成服.移柩.啓攢.立碑.謝土", "dayOfYear": 329, "weekOfYear": 47 } } 複製代碼
接口說明: 獲取指定多個日期的節假日及萬年曆信息
接口地址: [HOST]/holiday/multi/{dates} 【例如: [HOST]/holiday/multi/20180101,20181010,20181011】
參數說明: dates 日期組 格式 yyyyMMdd,yyyyMMdd,yyyyMMdd (中間用英文逗號隔開)
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": [ { "date": "2018-01-01", "weekDay": 1, "yearTips": "丁酉", "type": 2, "chineseZodiac": "雞", "solarTerms": "冬至後", "avoid": "出行.安葬.修墳.開市", "lunarCalendar": "11-15", "typeDes" : "元旦", "suit": "祭祀.塑繪.開光.裁衣.冠笄.嫁娶.納采.拆卸.修造.動土.豎柱.上樑.安牀.移徙.入宅.安香.結網.捕捉.畋獵.伐木.進人口.放水", "dayOfYear": 1, "weekOfYear": 1 }, { "date": "2018-10-10", "weekDay": 3, "yearTips": "戊戌", "type": 0, "chineseZodiac": "狗", "solarTerms": "寒露後", "typeDes" : "工做日", "avoid": "造廟.嫁娶.掘井.栽種.造橋.做竈.動土", "lunarCalendar": "9-2", "suit": "祭祀.開光.出行.解除.伐木.做梁.出火.拆卸.入宅.移徙.安牀.修造.造畜椆棲.掃舍", "dayOfYear": 283, "weekOfYear": 41 }, { "date": "2018-10-11", "weekDay": 4, "yearTips": "戊戌", "type": 0, "typeDes" : "工做日", "chineseZodiac": "狗", "solarTerms": "寒露後", "avoid": "入宅.上樑.齋醮.出火.謝土", "lunarCalendar": "9-3", "suit": "納采.訂盟.開市.交易.立券.會親友.納畜.牧養.問名.移徙.解除.做廁.入學.起基.安牀.開倉.出貨財.安葬.啓攢.入殮.除服.成服", "dayOfYear": 284, "weekOfYear": 41 } ] } 複製代碼
接口說明: 獲取指定月份的節假日及萬年曆信息
接口地址: [HOST]/holiday/list/month/{date} 【例如: [HOST]/holiday/list/month/201802】
參數說明: date 查詢的月份 格式 yyyyMM (只有年月)
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": [ { "date": "2018-02-01", "weekDay": 4, "yearTips": "丁酉", "type": 0, "chineseZodiac": "雞", "typeDes" : "工做日", "solarTerms": "大寒後", "avoid": "開倉.嫁娶.移徙.入宅", "lunarCalendar": "12-16", "suit": "祭祀.沐浴.祈福.齋醮.訂盟.納采.裁衣.拆卸.起基.豎柱.上樑.安牀.入殮.除服.成服.移柩.啓攢.掛匾.求嗣.出行.合賬.造畜椆棲", "dayOfYear": 32, "weekOfYear": 5 }, ...中間隱藏了"2018-02-02"~"2018-02-27"的數據 { "date": "2018-02-28", "weekDay": 3, "yearTips": "戊戌", "type": 0, "chineseZodiac": "狗", "typeDes" : "工做日", "solarTerms": "雨水後", "avoid": "掘井", "lunarCalendar": "1-13", "suit": "祭祀.齋醮.裁衣.合賬.冠笄.訂盟.納采.嫁娶.入宅.安香.謝土.入殮.移柩.破土.立碑.安香.會親友.出行.祈福.求嗣.立碑.上樑.放水", "dayOfYear": 59, "weekOfYear": 9 } ] } 複製代碼
接口說明: 獲取指定年份的節假日及萬年曆信息
接口地址: [HOST]/holiday//list/year/{date} 【例如: [HOST]/holiday/list/year/2018】
參數說明: date 查詢的年份 格式 yyyy (只有年份)
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": [ { "month": 1, "days": [ { "date": "2018-01-01", "weekDay": 1, "yearTips": "丁酉", "type": 2, "chineseZodiac": "雞", "solarTerms": "冬至後", "typeDes" : "元旦", "avoid": "出行.安葬.修墳.開市", "lunarCalendar": "11-15", "suit": "祭祀.塑繪.開光.裁衣.冠笄.嫁娶.納采.拆卸.修造.動土.豎柱.上樑.安牀.移徙.入宅.安香.結網.捕捉.畋獵.伐木.進人口.放水", "dayOfYear": 1, "weekOfYear": 1 }, ...中間隱藏了"2018-01-02"~"2018-01-30"的數據 { "date": "2018-01-31", "weekDay": 3, "yearTips": "丁酉", "type": 0, "chineseZodiac": "雞", "typeDes" : "工做日", "solarTerms": "大寒後", "avoid": "嫁娶.入殮.安葬.出行", "lunarCalendar": "12-15", "suit": "塑繪.開光.沐浴.冠笄.會親友.做竈.放水.造畜椆棲", "dayOfYear": 31, "weekOfYear": 5 } ] }, ...中間隱藏了02月到11月的數據 { "month": 12, "days": [ { "date": "2018-12-01", "weekDay": 6, "yearTips": "戊戌", "type": 1, "chineseZodiac": "狗", "typeDes" : "休息日", "solarTerms": "小雪後", "avoid": "做竈.治病", "lunarCalendar": "10-24", "suit": "祭祀.祈福.訂盟.納采.裁衣.拆卸.修造.動土.起基.安牀.移徙.入宅.安香.入殮.移柩.安葬.謝土.赴任.進人口.會親友", "dayOfYear": 335, "weekOfYear": 48 }, ...中間隱藏了"2018-12-02"~"2018-12-30"的數據 { "date": "2018-12-31", "weekDay": 1, "yearTips": "戊戌", "type": 0, "chineseZodiac": "狗", "solarTerms": "冬至後", "avoid": "開市.破土", "lunarCalendar": "10-25", "suit": "祭祀.沐浴.安牀.納財.畋獵.捕捉", "dayOfYear": 365, "weekOfYear": 1 } ] } ] } 複製代碼
接口說明: 獲取全國城市列表信息
接口地址: [HOST]/address/list
參數說明: 無參
返回數據:
數據樣例:
{
"code":1, "msg":"數據返回成功", "data":[ { "code":"130000", "name":"河北省", "pchilds":[ { "code":"130100", "name":"石家莊市", "cchilds":[ { "code":"130101", "name":"市轄區" }, { "code":"130102", "name":"長安區" }, ...這裏只顯示了兩個區... ] }, { "code":"130200", "name":"唐山市", "cchilds":[ { "code":"130201", "name":"市轄區" }, { "code":"130202", "name":"路南區" }, ...這裏只顯示了兩個區... ] }, ...這裏只顯示了兩個市... ] } ...這裏只顯示了一個省... ] } 複製代碼
接口說明: 搜索全國城市列表信息
接口地址: [HOST]/address/search 【例如: [HOST]/address/search?type=1&value=深圳】
參數說明:
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": [ { "code": "440000", "name": "廣東省", "pchilds": [ { "code": "440300", "name": "深圳市", "cchilds": [ { "code": "440301", "name": "市轄區" }, { "code": "440303", "name": "羅湖區" }, ...這裏只顯示了兩個區... ] } ] } ] } 複製代碼
接口說明: 獲取訪問者的ip地址信息,先獲取您的ip地址,再進行解析
接口地址: [HOST]/ip/self
參數說明: 無參
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "ip": "119.123.72.166", "province": "廣東省", "provinceId": 440000, "city": "深圳市", "cityId": 440300, "isp": "電信", "desc": "廣東省深圳市 電信" } } 複製代碼
接口說明: 獲取指定ip的ip地址信息
接口地址: [HOST]/ip/aim_ip?ip=? 【例如: [HOST]/ip/aim_ip?ip=119.123.72.166】
參數說明: ip 被查詢的ip地址 需保證是正確的ip地址格式
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "ip": "119.123.72.166", "province": "廣東省", "provinceId": 440000, "city": "深圳市", "cityId": 440300, "isp": "電信", "desc": "廣東省深圳市 電信" } } 複製代碼
接口說明: 獲取不重複長ID信息
接口地址: [HOST]/tools/no_repeat_id/long
參數說明: 無參
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "id": "8a2a789976e64a1c9455ebd90853d4c6" } } 複製代碼
接口說明: 獲取不重複短ID信息
接口地址: [HOST]/tools/no_repeat_id/short
參數說明: 無參
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "id": "jlazntmtjrvcrpnb" } } 複製代碼
接口說明: 獲取特定城市今日天氣信息
接口地址: [HOST]/weather/current/{城市名} 【例如: [HOST]/weather/current/深圳市】
參數說明: {城市名} 傳入你須要查詢的城市,請儘可能傳入完整值,不然系統會自行匹配,可能會有偏差
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "address": "廣東省 深圳市", "cityCode": "440300", "temp": "18℃", "weather": "小雨", "windDirection": "東北", "windPower": "≤3級", "humidity": "92%", "reportTime": "2018-11-27 22:40:53" } } 複製代碼
接口說明: 獲取特定城市今天及將來天氣信息
接口地址: [HOST]/weather/forecast/{城市名} 【例如: [HOST]/weather/forecast/深圳市】
參數說明: {城市名} 傳入你須要查詢的城市,請儘可能傳入完整值,不然系統會自行匹配,可能會有偏差
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "address": "廣東省 深圳市", "cityCode": "440300", "reportTime": "2018-11-27 22:40:53", "forecasts": [ { "date": "2018-11-27", "dayOfWeek": "2", "dayWeather": "陣雨", "nightWeather": "小雨", "dayTemp": "22℃", "nightTemp": "17℃", "dayWindDirection": "無風向", "nightWindDirection": "無風向", "dayWindPower": "≤3級", "nightWindPower": "≤3級" }, ...這裏只顯示了一條數據... ] } } 複製代碼
特別說明: 此接口的數據來源是個人另一個產品【段子樂】,目前Android客戶端已經在各大應用市場上架,按期更新數據到此服務。本服務目前只開放純文本段子,後期看狀況開放搞笑短視頻和搞笑圖片的接口。
接口說明: 分頁獲取笑話段子列表
接口地址: [HOST/jokes/list 【例如: [HOST]/jokes/list?page=1】
參數說明: page 分頁
返回數據:
數據樣例:
{
"code": 1, "msg": "數據返回成功", "data": { "page": 2, "totalCount": 9590, "totalPage": 959, "limit": 10, "list": [ { "content": "兒子:「爸爸,爲何王叔叔那麼喜歡吃辣」爸爸:「你怎麼知道王叔叔喜歡吃辣?」兒子:「別人都叫我媽媽爲辣媽,我常常看到王叔叔抱着我媽媽又親又啃」爸爸:「尼瑪」", "updateTime": "2018-11-03 09:45:28" }, ...這裏只顯示了一條數據... ] } } 複製代碼