本站提供的开放平台初步完成搭建,接下来将逐步添加API资源。因此,原有的API接口可能不再可用,现有如下资源可用:
资源索引#
必应必应每日故事[需授权]#
必应近八日美图[无需授权]#
必应随机图[无需授权]#
NASANASA每日故事[无需授权]#
视频电视剧API[需授权]#
权限申请#
API授权需要的AppId和AccessKey,在开放平台只需要通过你的邮箱便可以轻松获取,需要注意的是邮箱必须是真实可用的,在提交申请后系统将自动将AppId和AccessKey发送到你的邮箱,并且一个邮箱有且只能绑定一组AppId和AccessKey。API说明【测试】#
Host URI
https://api-cn.berryapi.net
必应每日故事#
必应每日故事提供的资源自2016.03.05始,提供美图的图片,故事,地理等内容。 Resources URI
/bing/
Example:
GET /bing/api.php?AppId=Your AppId&AccessKey=Your AccessKey&id=id
id为非必须,值为20160305到现在,默认调用当天数据,为你需要调用数据的日期,格式为 :date('Ymd')
Status:
200
Resources Properties:
| Property | Description | Type | Basic | Default |
|---|---|---|---|---|
| title | 故事名称 | str | Y | Y |
| attribute | 简述 | str | Y | Y |
| image | 图片url | str | Y | Y |
| story | 故事内容 | str | Y | Y |
| search | 必应搜索故事内容 | str | Y | Y |
| API AUTHOR | 本站版权 | str | Y | Y |
| provider | 图片版权 | str | Y | Y |
| Continent | 图片地位位置所在大洲 | str | Y | Y |
| Country | 图片地位位置所在国家 | str | Y | Y |
| City | 图片地位位置所在城市 | str | Y | Y |
| Longitude | 图片地位位置所在经度 | str | Y | Y |
| Latitude | 图片地位位置所在纬度 | str | Y | Y |
| date | 故事日期 | str | Y | Y |
必应近八日美图#
七日美图地址尚未改变 ,调用也无需取得授。 Resources URI
/bing/image/
Example:
GET /bing/image/?w=width&h=height&d=-1~7
d为非必须,默认调用当天数据。
Status:
200
Resources Properties:
| 参数名 | 类型 | 是否必要 | 说明 |
|---|---|---|---|
| w | Int | 是 | 图片宽度 |
| h | Int | 是 | 图片高度 |
| d | Int | 否 | 自今日起第d天前的图片 |
可用分辨率:#
'1920x1080', '1366x768', '1280x768', '1024x768', '800x600', '800x480', '768x1280', '720x1280', '640x480', '480x800', '400x240', '320x240', '240x320'
可用日期:#
d={-1,0,1,2,3,4,5,6,7}必应随机图#
随机图片目前无需取得授权,由系统从库中随机一张图片供调用,你可以随机调用任意分辨率的图片【图片基本分辨率为1920*1080】,但随机图仅只能一次存在,再次请求前一张图将会被系统销毁,当然你可以在随机图生成后保存待用。
Resources URI
/bing/image/random/
Example:
GET /bing/image/random/?w=width&h=height
Status:
200
Resources Properties:
| 参数名 | 类型 | 是否必要 | 说明 |
|---|---|---|---|
| w | Int | 是 | 图片宽度 |
| h | Int | 是 | 图片高度 |
NASA每日故事#
Resources URI
/nasa/
Example:
GET /nasa/
Status:
200
Resources Properties:
| Property | Description | Type | Basic | Default |
|---|---|---|---|---|
| title | 故事名称 | str | Y | Y | story | 故事内容 | str | Y | Y |
| hdurl | 高清NASA每日美图 | str | Y | Y |
| url | 普通NASA每日美图 | str | Y | Y |
| API AUTHOUR | 本站版权 | str | Y | Y |
| copyright | 图片版权 | str | Y | Y |
| date | 故事日期 | str | Y | Y |
电视剧API#
Resources URI
/video/
Example:
GET /video/?AppId=YourAppId&AccessKey=YourAccessKey&cat=&area=&year=&act=&page=
Status:
200
Resources Properties:
| Property | Description | Type | Basic | Default |
|---|---|---|---|---|
| id | 电视剧唯一id | str | Y | Y | title | 电视剧名称 | str | Y | Y |
| img | 电视剧图片 | str | Y | Y |
| episode | 电视剧集数 | str | Y | Y |
| starring | 主演 | str | Y | Y |
| cat | 分类 | int | Y | Y |
| area | 地区 | int | Y | Y |
| year | 年份 | str | Y | Y |
| page | 页码数 | int | Y | Y |
| playapi | 解析接口 | str | Y | Y |
必应随机壁纸API接口
必应BING每日壁纸接口API
评论