Socket
Socket
Sign inDemoInstall

api-interface

Package Overview
Dependencies
117
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    api-interface

API-Interface


Version published
Weekly downloads
17
increased by1600%
Maintainers
1
Install size
10.6 MB
Created
Weekly downloads
 

Readme

Source

API-Interface

master MIT License

目录

服务器部署

返回列表目录

git clone https://github.com/Lete114/API-Interface.git API-Interface ## 克隆源码
cd API-Interface
npm install ## 安装依赖
npm run start ## 启动服务

嵌入其它项目

返回列表目录

安装

npm i api-interface

引入

const APIInterface = require('api-interface')

APIInterface.bing({}).then((res) => {
  console.log('res', res)
  // res {
  //   startdate: '2022-10-09',
  //   enddate: '2022-10-10',
  //   title: '穿越意大利峡湾之旅',
  //   copyright: '瓦伦蒂诺大坝,意大利伦巴第大区布雷西亚省 (© wmaster890/Getty Images)',
  //   cover: [
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_UHD.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_1920x1200.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_1920x1080.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_1366x768.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_1280x768.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_1024x768.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_800x600.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_800x480.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_768x1280.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_720x1280.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_640x480.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_480x800.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_400x240.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_320x240.jpg',
  //     'https://www.bing.com/th?id=OHR.ValvestinoDam_ZH-CN8397604653_240x320.jpg'
  //   ]
  // }
})

APIInterface.videoDouyin({ url: 'https://v.douyin.com/MNHBD8d/' }).then((res) => {
  console.log('res', res)
  // res {
  //   author: {
  //     nick: '王玉萌',
  //     avatar: [
  //       'https://p26.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_14a12a9ab604700dbefc5ec4094026ea.jpeg?from=116350172',
  //       'https://p3.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-avt-0015_14a12a9ab604700dbefc5ec4094026ea.jpeg?from=116350172',
  //       'https://p6.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_14a12a9ab604700dbefc5ec4094026ea.jpeg?from=116350172'
  //     ],
  //     desc: '抖音音乐木星计划成员\n' +
  //       '今日直播时间:晚22:30-3:00\n' +
  //       'wb🧣:还在努力的王玉萌\n' +
  //       '网易云/酷狗/Q:王玉萌 \n' +
  //       '合作🌟:hz-flow16\n' +
  //       '不玩回森 有事wb私信'
  //   },
  //   video: {
  //     title: '辛巴巴巴噜比啦~ #симпа #辛巴巴巴噜比啦  #q音宝藏',
  //     paly: [
  //       'https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200f810000c0n4c4vtij5kpv3luijg&ratio=720p&line=0',
  //       'https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200f810000c0n4c4vtij5kpv3luijg&ratio=720p&line=0'
  //     ]
  //   },
  //   music: {
  //     author: '王玉萌',
  //     title: '歌名_Симпа一王玉萌(原声中的歌曲:Simpa Pa Pa-Citethsea)',
  //     play: 'https://sf3-cdn-tos.douyinstatic.com/obj/ies-music/6930554295213443848.mp3',
  //     cover: {
  //       cover_thumb: 'https://p26.douyinpic.com/img/aweme-avatar/tos-cn-avt-0015_14a12a9ab604700dbefc5ec4094026ea~c5_168x168.jpeg?from=116350172',
  //       cover_medium: 'https://p3.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-avt-0015_14a12a9ab604700dbefc5ec4094026ea.jpeg?from=116350172',
  //       cover_large: 'https://p11.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_14a12a9ab604700dbefc5ec4094026ea.jpeg?from=116350172'
  //     }
  //   },
  //   cover: {
  //     cover: 'https://p26-sign.douyinpic.com/tos-cn-p-0015/7c780d935f8447f282a0f3fd30caa9ea_1613645426~c5_300x400.jpeg?x-expires=1666584000&x-signature=4sdDi1nxZJPFQ4AfD5Ccx37Nyss%3D&from=3213915784_large&s=PackSourceEnum_DOUYIN_REFLOW&se=false&sc=cover&l=202210101210170102080451553E3F2B16',
  //     dynamic_cover: 'https://p26-sign.douyinpic.com/obj/tos-cn-p-0015/e38001afd4234dfebdf7db697ad4bc91_1613645425?x-expires=1666584000&x-signature=ElxLZu5dgF3NJCGsPQjpX7eBYAY%3D&from=3213915784_large',
  //     origin_cover: 'https://p26-sign.douyinpic.com/tos-cn-p-0015/83d5433d7c114ce8915eca796073f846_1613645425~tplv-dy-360p.jpeg?x-expires=1666584000&x-signature=odnv8PJ7%2BHLN4XkeAk3f47linCc%3D&from=3213915784&se=false&biz_tag=feed_cover&l=202210101210170102080451553E3F2B16'
  //   }
  // }
})

API

请求方法: GET

响应内容: JSON

site

返回列表目录

/-/site?url=https://www.example.com

请求参数

昵称必填类型描述
urlstring请求的网站
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为网站的 favicon 地址,同时会重定向到该地址

bing

返回列表目录

/-/bing

请求参数

昵称必填类型描述
regionstringBing 每日壁纸的不同地区,每个地区的壁纸都不一样,默认: en-US,可选: zh-CN, en-US, ja-JP, en-AU, en-UK, de-DE, en-NZ, en-CA
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为壁纸的地址,同时会重定向到该地址
datestring指定一个日期,获取这个日期的壁纸,目测只能获取当前日期的前 10 天的壁纸
dpistring修改 redirect 默认的壁纸分辨率

qqAvatar

返回列表目录

/-/qq/avatar?qq=123456

昵称必填类型描述
qqstring要获取的 QQ 号头像
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为头像的地址,同时会重定向到该地址

qqNick

返回列表目录

/-/qq/nick?qq=123456

昵称必填类型描述
qqstring要获取的 QQ 号头像

qqStatus

/-/qq/status?qq=123456

返回列表目录

昵称必填类型描述
qqstring要获取的 QQ 号头像

videoDouyin

/-/video/douyin?url=https://www.example.com

返回列表目录

昵称必填类型描述
urlstring可以是分享的短链接、长链接、视频 ID
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为视频的地址,同时会重定向到该地址

videoHuoshan

返回列表目录

/-/video/huoshan?url=https://www.example.com

昵称必填类型描述
urlstring可以是分享的短链接、长链接、视频 ID
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为视频的地址,同时会重定向到该地址

videoPipixia

/-/video/pipixia?url=https://www.example.com

返回列表目录

昵称必填类型描述
urlstring可以是分享的短链接、长链接、视频 ID
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为视频的地址,同时会重定向到该地址

videoWeishi

返回列表目录

/-/video/weishi?url=https://www.example.com

昵称必填类型描述
urlstring可以是分享的链接、视频 ID
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为视频的地址,同时会重定向到该地址

videoZuiyou

/-/video/zuiyou?url=https://www.example.com

返回列表目录

昵称必填类型描述
urlstring可以是分享的链接、视频 ID
typestring当该字段等于 image 时,返回参数会新增一个 redirect 值为视频的地址,同时会重定向到该地址

Keywords

FAQs

Last updated on 11 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc