WishMeLz

生活其实很有趣

分类 Api 下的文章

每日必应壁纸 Bing API

https://global.bing.com/HPImageArchive.aspx?format=js&idx=0&n=8&pid=hp&FORM=BEHPTB&uhd=1&uhdwidth=3840&uhdheight=2160&setmkt=zh_cn&setlang=enhttps://www.bing.com/${url}参数名参数值描述formatjs/rss/xml (必填)决定返回结果格式idx-1 到 8 的整数(必填)日期偏移量,若空或0则返回本日数据,-...

非对称加密(node-rsa,jsencrypt)

公钥私钥生成随便找个在线生成的http://www.metools.info/code/c80.htmlORconst NodeRSA = require('node-rsa') const fs = require('fs') const newkey = new NodeRSA({ b: 512 }) newkey.setOptions({ encryptionScheme: 'pkcs1' }) let public_key = newkey.exportKey('pkcs8-public') //公钥 let private_key =...

request获取重定向的地址

var r = request(url, function (e, response,body) { r.uri response.request.uri console.log(response.statusCode); console.log(this.uri.href); })

时间API

苏宁: https://f.m.suning.com/api/ct.do or http://quan.suning.com/getSysTime.do { "api": "time", "code": "1", "currentTime": 1647506518039, "msg": "" } or { "sysTime2": "2022-03-17 16:46:39", "sysTime1": "20220317164639" } 淘宝: http://api.m.taoba...

gravatar全球通用头像

 https://cn.gravatar.com/avatar/4c6e391ddde7dae7d9ebf03bb584c064?s=73&d=retro这里需要一个哈希值来确定头像的唯一性, 通过MD5加密就可以.s是尺寸, d是类型对应如下 .item { display: flex; align-items: center; margin-top: 20px; } .item img { margin-right: 12px;margin-left...

阿里STS权限管理

打开地址  https://ram.console.aliyun.com/roles创建用户来获取 accessKeyId accessKeySecretRAM角色管理,创建RAM角色,选择阿里云给角色添加权限,可以添加无数个,最重要的是添加AliyunSTSAssumeRoleAccesslet OSS = require('ali-oss'); let STS = OSS.STS; let sts = new STS({ accessKeyId: 'LTAI5*******e4eSf', ...

赛邮云通信SUBMAIL

NodeJs发送短信var request = require('request'); let post = function (url, postdata) { let options = { url: url, formData: postdata }; return new Promise(function (resolve, reject) { request.post(options, function (err, response, body) { ...