All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

All gists matching topic api

Recently created
Least recently created
Recently updated
Least recently updated
LiuShen's Avatar

LiuShen / 利用CF Worker实现一个每日bing一图接口API

0 likes
0 forks
1 files
Last active 1744868788
利用CF Worker实现一个每日bing一图接口API,可以直接用作图片数据。
api bing cache cloudflare worker
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 === "/") {
Newer Older

Powered by Opengist ⋅ Load: 16ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ 个人主页 ⋅ 站长博客