合作推广
蹦熊代寄 — 寄快递,更省钱
全国上门取件,圆通、中通、顺丰等多品牌一键比价。个人寄件、退换货、行李托运、电商发货都能用,下单后快递员准时上门,省心又实惠。
微信扫码,手机下单
打开蹦熊代寄
https://m.bengxiong.com
欢迎使用 PC530 易储服务!通过标准 HTTP 请求随时对云端键值数据进行存取。
https://api.pc530.com/v1/storage,URL 中不含邮箱或用户名Authorization: Bearer 鉴权,遵循 RFC 6648expire_in 相对过期,或永久保存在调用任何接口前,请先前往控制台获取您的 API Secret。所有用户共用固定 API 根地址,身份仅通过 HTTP Header 识别:
Authorization: Bearer 您的唯一API_SECRET
Content-Type: application/json
API 根地址:https://api.pc530.com/v1/storage
import requests
url = "https://api.pc530.com/v1/storage/set"
headers = {
"Authorization": "Bearer 您的唯一API_SECRET",
"Content-Type": "application/json"
}
data = {
"key": "site_notice",
"value": "欢迎来到PC530网站!今日维护升级调整。",
"expire_in": 3600 # 3600秒(1小时)后自动销毁。如果传0则为永久保存。
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
curl -X GET "https://api.pc530.com/v1/storage/get?key=site_notice" \
-H "Authorization: Bearer 您的唯一API_SECRET"
成功时 HTTP 状态码 200,响应体为 JSON:
{
"code": 200,
"message": "success",
"data": {
"key": "site_notice",
"value": "欢迎来到PC530网站!今日维护升级调整。",
"expired_at": 946656000,
"updated_at": 1749109800
}
}
data 字段说明:
key(String):请求的键名value(String):存储的文本内容expired_at(Integer):绝对过期 Unix 时间戳(秒);永久有效固定为 946656000(即 2000-01-01 00:00:00 东八区)updated_at(Integer):上次写入或更新的 Unix 时间戳(秒)若 key 不存在或已过期,HTTP 状态码 404:
{
"code": 404,
"message": "key 不存在或已过期"
}
未携带或 Secret 错误时,HTTP 状态码 401:
{
"code": 401,
"message": "Unauthorized"
}
curl -X DELETE "https://api.pc530.com/v1/storage/delete" \
-H "Authorization: Bearer 您的唯一API_SECRET" \
-H "Content-Type: application/json" \
-d '{"key": "site_notice"}'
警告:删除为即时物理删除,系统不保留备份,请谨慎操作。