LiuShen / 利用CF Worker实现一个每日bing一图接口API
0 gustos
0 bifurcaciones
1 archivos
Última actividad 6 months ago
利用CF Worker实现一个每日bing一图接口API,可以直接用作图片数据。
| 1 | // 利用api.nsmao.net实现的bing接口 |
| 2 | const API_KEY = "ajdlfklahweufbrffbhjefjfsmd,shj" // 自行申请API |
| 3 | const CACHE_TTL = 36000 // 10 小时 |
| 4 | |
| 5 | export default { |
| 6 | async fetch(request, env, ctx) { |
| 7 | const { pathname } = new URL(request.url) |
| 8 | |
| 9 | // 首页说明 |
| 10 | if (pathname === "/") { |
LiuShen / 通过cloudflare Worker创建github api中间件
0 gustos
0 bifurcaciones
1 archivos
Última actividad 8 months ago
通过cloudflare Worker创建github api中间件,在隐藏token的情况下获取仓库提交信息
| 1 | /** |
| 2 | * Welcome to Cloudflare Workers! This is your first worker. |
| 3 | * |
| 4 | * - Run "npm run dev" in your terminal to start a development server |
| 5 | * - Open a browser tab at http://localhost:8787/ to see your worker in action |
| 6 | * - Run "npm run deploy" to publish your worker |
| 7 | * |
| 8 | * Learn more at https://developers.cloudflare.com/workers/ |
| 9 | */ |
Siguiente
Anterior