请求信息
请使用编码后的真实地址发起调用
https://api.chuliangnet.com/API/today.php
请求参数
按文档填写参数后即可联调
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| w | string | 必填 | 图片宽度,默认1920 |
| h | string | 必填 | 图片长度默认1080 |
| uhd | string | 必填 | 是否4k,默认False,为True时请求参数w和h无效。1920x1200, 1920x1080, 1080x1920,1366x768, 1280x768, 1024x768, 800x600, 800x480, 768x1280, 720x1280, 640x480, 480x800, 400x240, 320x240, 240x320 |
| uhd | string | 必填 | 地区,默认zh-CN。目前支持的地区码:zh-CN, de-DE, en-CA, en-GB, en-IN, en-US, fr-FR, it-IT, ja-JP |
在线调试
填写参数后点击测试,示例代码会同步更新
此处将显示接口返回结果...
示例代码
参数改动会自动同步到示例,可直接复制到本地调试
curl -G "https://api.chuliangnet.com/API/today.php" \ --data-urlencode "w=xxx" \ --data-urlencode "h=xxx" \ --data-urlencode "uhd=xxx" \ --data-urlencode "uhd=xxx"
<?php
$method = 'GET';
$url = 'https://api.chuliangnet.com/API/today.php';
$params = [
'w' => 'xxx',
'h' => 'xxx',
'uhd' => 'xxx',
'uhd' => 'xxx'
];
$query = http_build_query($params);
$target = $query !== '' ? $url . '?' . $query : $url;
$ch = curl_init($target);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);
curl_close($ch);
import requests
url = "https://api.chuliangnet.com/API/today.php"
params = {
"w": "xxx",
"h": "xxx",
"uhd": "xxx",
"uhd": "xxx"
}
resp = requests.get(url, params=params, timeout=10)
print(resp.status_code)
print(resp.text)
const params = {
w: "xxx",
h: "xxx",
uhd: "xxx",
uhd: "xxx"
};
const query = new URLSearchParams(params).toString();
fetch('https://api.chuliangnet.com/API/today.php' + (query ? '?' + query : ''))
.then(r => r.text())
.then(console.log);