Difference between revisions of "月升月落月相接口"

From Caiyun Wiki
Jump to: navigation, search
(API 地址)
(API 地址)
 
(4 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
== API 地址 ==
 
== API 地址 ==
  
[http://api.caiyunapp.com/v1/astro/moon?lat=39&lng=116&token=TOKEN&days=3 <code>hhttp://api.caiyunapp.com/v1/astro/moon?lat=39&lng=116&token=TOKEN&days=3</code>]
+
[http://api.caiyunapp.com/v1/astro/moon?lat=39&lng=116&token=TOKEN&days=2 <code>http://api.caiyunapp.com/v1/astro/moon?lat=39&lng=116&token=TOKEN&days=2</code>]
  
 
== 参数说明 ==
 
== 参数说明 ==
Line 19: Line 19:
 
     {
 
     {
 
       "date": "2021-12-17",
 
       "date": "2021-12-17",
       "rise": "15:35:28",
+
       "rise": "15:15:00",
       "phase": 158.81,
+
       "phase": 152.83,
       "set": "06:31:09",
+
       "set": "05:10:30",
       "phase_name": "满月"
+
       "phase_name": "盈凸月"
 
     },
 
     },
 
     {
 
     {
       "date": "2021-12-31",
+
       "date": "2021-12-18",
       "rise": "05:55:26",
+
       "rise": "15:51:10",
       "phase": 324.01,
+
       "phase": 163.57,
       "set": "14:26:31",
+
       "set": "06:10:20",
       "phase_name": "残月"
+
       "phase_name": "满月"
 
     }
 
     }
 
   ]
 
   ]

Latest revision as of 08:55, 17 December 2021

授权与认证 

请先至彩云开放平台注册,注册后可以获得 token 。

使用本接口,开发者token需要额外开通权限,请联系商务:api@caiyunapp.com

API 地址

http://api.caiyunapp.com/v1/astro/moon?lat=39&lng=116&token=TOKEN&days=2

参数说明

  • days: int, 最大 15 天

返回结构

 1 {
 2   "status": "ok",
 3   "data": [
 4     {
 5       "date": "2021-12-17",
 6       "rise": "15:15:00",
 7       "phase": 152.83,
 8       "set": "05:10:30",
 9       "phase_name": "盈凸月"
10     },
11     {
12       "date": "2021-12-18",
13       "rise": "15:51:10",
14       "phase": 163.57,
15       "set": "06:10:20",
16       "phase_name": "满月"
17     }
18   ]
19 }

注:月升月落不是每一天都一定会有,默认值是 "-" 表示没有月升或者月落