查询十二星座的每日运势信息
http://api.xuewutheme.com/api/other/constellation?name=白羊座
查询十二星座的每日运势信息
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| apikey string | 整数 | string |
用户开通的apikey |
| name string | 整数 | string |
星座名称 |
| 参数名 | 类型 | 描述 |
|---|---|---|
| code integer | integer |
返回的状态码 |
| data object | object |
返回的数据/数据对象 |
| msg string | string |
返回的消息 |
| time string | string |
请求时间 |
| data.constellation string | string |
星座 |
| data.benefactor_direction string | string |
贵人方位 |
| data.benefactor_constellation string | string |
贵人星座 |
| data.lucky_number string | string |
幸运数字 |
| data.lucky_color string | string |
幸运颜色 |
| data.love_fortune string | string |
爱情运势 |
| data.wealth_fortune string | string |
财富运势 |
| data.career_fortune string | string |
事业运势 |
| data.overall_fortune string | string |
整体运势 |
| data.tips string | string |
提示 |
{
"code": 200,
"msg": "请求成功!",
"time": "2025-06-24 16:01:39",
"data": {
"constellation": "白羊",
"benefactor_direction": "西南方向",
"benefactor_constellation": "狮子座",
"lucky_number": "1",
"lucky_color": "墨玉绿",
"love_fortune": "吃喝玩乐的机会很多,想要有恋爱的感觉呢就必须自己主动掌握机会了。",
"wealth_fortune": "工作上有经手钱财的机会,然而居多是过路财神,不是自己的钱啦!\\n",
"career_fortune": "工作干劲十足,希望获得同事、上司认可的欲望强烈,因此会极力表现出积极的工作态度,会选择曾不敢想、不敢做的事情来做,令人刮目相看。",
"overall_fortune": "今天心情愉快,亲和力突显,适合拓展人脉。约三五好友相聚既能增进感情,又能因朋友介绍而结识新朋友,何乐而不为呢?求职者得到亲友的帮助,有机会谋得一份不错的工作。",
"tips": "人际关系融洽,有机会结识新朋友。"
}
}
curl -X GET \
"https://api.example.com/v1/users/12345" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json"
import requests
url = "https://api.example.com/v1/users/12345"
headers = {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch(
'https://api.example.com/v1/users/12345',
{
method: 'GET',
headers: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
console.log(data);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.example.com/v1/users/12345");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$headers = array();
$headers[] = "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...";
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
curl_close($ch);
| 状态码 | 描述 |
|---|---|
| 100 | 您的apikey值为空! |
| 101 | 您的apikey值不存在! |
| 103 | 当前接口为实名认证后可用,请您先进行实名! |
| 104 | 请求频率超限! |
| 105 | 接口不存在或已下线! |
| 106 | 您的余额不足,请及时充值! |
| 107 | 您当前的接口免费使用次数已用完,请明日再来! |
| 109 | 您的账号已被封禁,不可使用任何接口! |
| 110 | 接口维护中,请稍后再试! |
| 111 | 请求参数不完整,请检查后再次访问! |
{
"code": 1001,
"message": "用户不存在",
"data": null
}