星座运势
<p>[TOC]</p>
<h3>简介</h3>
<ul>
<li>包含十二星座的每日运势,明日运势,每周运势,当年运势以及星座配对。具体包括缘份星座、吉利颜色、幸运数字、爱情提醒、运势简评、爱情运势、工作运势、财富运势、健康运势、情欲分析等。广泛应用于星座社区、爱情匹配和心灵治愈等场景。</li>
</ul>
<h3>接口调用说明</h3>
<h4>请求方式</h4>
<p>如接口没有单独说明,所有接口均为:<strong>POST</strong></p>
<h4>请求格式</h4>
<p>如接口没有单独说明,所有接口均为:<strong>application/form-data</strong></p>
<h4>请求参数</h4>
<p>请求参数均包括公共参数和业务参数(业务参数见具体接口说明)
如接口没有单独说明,所有接口调用时,均需要把<strong>公共参数</strong>和<strong>业务参数</strong>一并放在<strong>请求参数</strong>中提交</p>
<p><a name="公共请求参数"></a></p>
<h5>公共请求参数</h5>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:420px;">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>是</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>timestamp</td>
<td>Long</td>
<td>是</td>
<td>当前时间戳(毫秒)</td>
</tr>
<tr>
<td>sign</td>
<td>String</td>
<td>是</td>
<td>签名,详见签名算法说明</td>
</tr>
</tbody>
</table>
<h5>签名算法说明</h5>
<pre><code>sign = sha256(appId + appSecret + timestamp)</code></pre>
<p>用服务商分配的 <strong>appId</strong>、服务商分配的 <strong>appSecret</strong>,当前时间戳(毫秒) <strong>timestamp</strong>,按上述顺序拼接成字符串,再进行 <strong>sha256</strong> 哈希得到。如下:</p>
<pre><code class="language-java">String appId = &quot;xyzxy2121zxyz&quot;;
String timestamp = &quot;1555378976238&quot;;
String appSecret = &quot;efcefcef1121cefcefc1212121&quot;;
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h4>返回说明</h4>
<h5>返回字段说明</h5>
<p>所有接口均返回以下公共字段:</p>
<table>
<thead>
<tr>
<th>字段名</th>
<th><div style="width:420px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>返回码,详见:code返回码说明</td>
</tr>
<tr>
<td>msg</td>
<td>code对应的描述</td>
</tr>
<tr>
<td>charge</td>
<td>计费标志 true为计费,false为不计费</td>
</tr>
<tr>
<td>taskNo</td>
<td>本次请求号</td>
</tr>
<tr>
<td>data</td>
<td>返回具体结果,object类型,详见data返回字段描述</td>
</tr>
</tbody>
</table>
<p><a name="code返回码说明"></a></p>
<h5>code返回码说明</h5>
<table>
<thead>
<tr>
<th>code</th>
<th><div style="width:420px;">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功(计费)</td>
</tr>
<tr>
<td>201</td>
<td>查无记录</td>
</tr>
<tr>
<td>400</td>
<td>参数错误</td>
</tr>
<tr>
<td>404</td>
<td>请求地址不正确</td>
</tr>
<tr>
<td>500</td>
<td>服务商维护,请稍候再试</td>
</tr>
<tr>
<td>601</td>
<td>接口未开通</td>
</tr>
<tr>
<td>602</td>
<td>账号停用</td>
</tr>
<tr>
<td>603</td>
<td>余额不足请充值</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>606</td>
<td>调用超限,请稍候再试</td>
</tr>
<tr>
<td>607</td>
<td>ip不在白名单</td>
</tr>
<tr>
<td>609</td>
<td>请求过于频繁,请稍候再试</td>
</tr>
<tr>
<td>610</td>
<td>请求超时</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>
<hr />
<h3>星座运势查询</h3>
<ul>
<li>十二星座为:白羊座、金牛座、双子座、巨蟹座、狮子座、处女座、天秤座、天蝎座、射手座、摩羯座、水瓶座、双鱼座。</li>
</ul>
<h4>请求地址</h4>
<p><code>https://api.jumdata.com/star-sign/fate/query</code></p>
<h4>业务参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>star</td>
<td>String</td>
<td>是</td>
<td>十二星座,其值分别为:<br/>baiyang<br/>jinniu<br/>shuangzi<br/>juxie<br/>shizi<br/>chunv<br/>tiancheng<br/>tianxie<br/>sheshou<br/>mojie<br/>shuiping<br/>shuangyu</td>
</tr>
<tr>
<td>date</td>
<td>String</td>
<td>否</td>
<td>日期(MMdd) 用于自动转换到需要查询的星座 没有star参数时以date为准</td>
</tr>
<tr>
<td>needTomorrow</td>
<td>String</td>
<td>否</td>
<td>是否需要明天的数据,1为需要,其他不需要</td>
</tr>
<tr>
<td>needWeek</td>
<td>String</td>
<td>否</td>
<td>是否需要本周运势的数据,1为需要,其他不需要</td>
</tr>
<tr>
<td>needMonth</td>
<td>String</td>
<td>否</td>
<td>是否需要本月运势的数据,1为需要,其他不需要</td>
</tr>
<tr>
<td>needYear</td>
<td>String</td>
<td>否</td>
<td>是否需要本年运势的数据,1为需要,其他不需要</td>
</tr>
</tbody>
</table>
<p>公共请求参数请参阅:<a href="#公共请求参数">公共请求参数</a></p>
<h4>成功返回样例</h4>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//返回码对应描述
&quot;charge&quot;: true,//计费标志
&quot;taskNo&quot;: &quot;884959842152716171574445&quot;,//本次请求号
&quot;data&quot;: {
&quot;star&quot;: &quot;baiyang&quot;,//查询的星座名称
&quot;week&quot;: {//本周运势数据对象
&quot;money_star&quot;: 5,//财富指数,最高5分
&quot;xrxz&quot;: &quot;天秤座&quot;,//小人星座
&quot;love_txt&quot;: &quot;对于单身的白羊座来说,xxxx&quot;,//爱情运势
&quot;health_txt&quot;: &quot;运程分析:身体无恙,xxxx&quot;,//健康运势
&quot;lucky_num&quot;: &quot;3&quot;,//幸运数字
&quot;money_txt&quot;: &quot;本周白羊座的财运相对不错,xxxx&quot;,//财富运势
&quot;summary_star&quot;: 4,//综合指数,最高5分
&quot;love_star&quot;: 4,//爱情指数,最高5分
&quot;lucky_day&quot;: &quot;星期二&quot;,//幸运日期
&quot;lucky_color&quot;: &quot;橙色&quot;,//吉利颜色
&quot;work_txt&quot;: &quot;在事业方面,xxxx&quot;,//工作运势
&quot;time&quot;: &quot;20241208-20241215&quot;,//时间
&quot;grxz&quot;: &quot;射手座&quot;,//贵人星座
&quot;general_txt&quot;: &quot;本周白羊座的整体运势呈现出一种稳健的态势。xxxx&quot;,//运势简评
&quot;week_notice&quot;: &quot;接受挑战,解决问题。&quot;,//本周提醒
&quot;day_notice&quot;: &quot;学会自得其乐&quot;,//今日提醒
&quot;lucky_direction&quot;: &quot;&quot;,//吉利方位
&quot;work_star&quot;: 3 //工作指数,最高5分
},
&quot;day&quot;: {
},
&quot;month&quot;: {
},
&quot;year&quot;: {
},
&quot;tomorrow&quot;: {
}
}
}</code></pre>
<h4>失败返回样例</h4>
<pre><code class="language-json">{
&quot;code&quot;: 400,
&quot;msg&quot;: &quot;星座和日期不能同时为空&quot;
}</code></pre>
<hr />
<h3>星座配对</h3>
<ul>
<li>可以根据您和另一半的星座测试出你们未来的发展趋势和发展方向,数据反馈结果仅供参考。</li>
</ul>
<h4>请求地址</h4>
<p><code>https://api.jumdata.com/star-sign/match</code></p>
<h4>业务参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>star1</td>
<td>String</td>
<td>是</td>
<td>十二星座,其值分别为:baiyang,jinniu,shuangzi,juxie,shizi,chunv,tiancheng,tianxie,sheshou,mojie,shuiping,shuangyu</td>
</tr>
<tr>
<td>gender1</td>
<td>String</td>
<td>是</td>
<td>1、男 0、女</td>
</tr>
<tr>
<td>star2</td>
<td>String</td>
<td>是</td>
<td>十二星座,其值分别为:baiyang,jinniu,shuangzi,juxie,shizi,chunv,tiancheng,tianxie,sheshou,mojie,shuiping,shuangyu</td>
</tr>
<tr>
<td>gender2</td>
<td>String</td>
<td>是</td>
<td>1、男 0、女</td>
</tr>
</tbody>
</table>
<p>公共请求参数请参阅:<a href="#公共请求参数">公共请求参数</a></p>
<h4>成功返回样例</h4>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//返回码对应描述
&quot;charge&quot;: true,//计费标志
&quot;taskNo&quot;: &quot;144644841226747680124070&quot;,//本次请求号
&quot;data&quot;: {
&quot;love&quot;: &quot;4&quot;,//爱情配对指数
&quot;friendship&quot;: &quot;3&quot;,//友情配对指数
&quot;grxz2&quot;: &quot;天秤座&quot;,//星座
&quot;proportion&quot;: &quot;44:56&quot;,//星座配对比重
&quot;grxz1&quot;: &quot;狮子座&quot;,//星座
&quot;gender1&quot;: &quot;女&quot;,//性别
&quot;match&quot;: &quot;90分&quot;,//综合配对指数
&quot;gender2&quot;: &quot;男&quot;,//性别
&quot;star2&quot;: &quot;tiancheng&quot;,//星座
&quot;suggest&quot;: &quot;火象的狮子座和风象的天秤座相遇,xxxx&quot;,//恋爱建议
&quot;match_case&quot;: &quot;你们有如《天龙八部》乔峰与阿朱,xxxx&quot;,//配对示例
&quot;lqxy&quot;: &quot;5&quot;,//两情相悦指数
&quot;star1&quot;: &quot;shizi&quot;,//星座
&quot;predestination&quot;: &quot;你俩都爱热闹、喜欢参加群体活动,xxxx&quot;,//缘分解析
&quot;review&quot;: &quot;非常理想的一对&quot;,//星座速配点评
&quot;affection&quot;: &quot;3&quot;,//亲情配对指数
&quot;attention&quot;: &quot;狮子在追求秤子时要注意了,有力的支持。xxxx&quot;,//注意事项
&quot;forever&quot;: &quot;4&quot;,//天长地久指数
&quot;married&quot;: &quot;2&quot;,//婚姻配对指数
&quot;info&quot;: &quot;相处中需要注意的地方:xxxx&quot; //其它建议
}
}</code></pre>
<h4>失败返回样例</h4>
<pre><code class="language-json">{
&quot;code&quot;: 400,
&quot;msg&quot;: &quot;star1不能为空!&quot;
}</code></pre>
<hr />