今年IPhone 14 Pro 系列增加了Apple Watch的熄屏显示(Always On Display)功能。这个功能真的很香,大约每小时多消耗1%的电量,同时在无光环境下(如放口袋里、夜晚关灯后)屏幕会自动熄灭。当然我相信苹果肯定做了系统优化防止OLED烧屏,至少过保前肯定不会烧是吧。
Unsplash API
API简介
Authorization
Public Authentication
Most actions can be performed without requiring authentication from a specific user. For example, searching, fetching, or downloading a photo does not require a user to log in.
To authenticate requests in this way, pass your application’s access key via the HTTP Authorization header:
|
|
You can also pass this value using a client_id
query parameter:
|
|
Get a random photo
Retrieve a single random photo, given optional filters.
|
|
API获取图片链接
|
|
这里有几种类型的图片raw
full
regular
small
thumb
small_s3
,对应的键值为该质量图片的下载链接。
full
returns the photo in jpg format with its maximum dimensions. For performance purposes, we don’t recommend using this as the photos will load slowly for your users.regular
returns the photo in jpg format with a width of 1080 pixels.small
returns the photo in jpg format with a width of 400 pixels.thumb
returns the photo in jpg format with a width of 200 pixels.raw
returns a base image URL with just the photo path and theixid
parameter for your API application. Use this to easily add additional image parameters to construct your own image URL.
同时可以通过以下参数调整图像大小质量
w
,h
: for adjusting the width and height of a photocrop
: for applying cropping to the photofm
: for converting image formatauto=format
: for automatically choosing the optimal image format depending on user browserq
: for changing the compression quality when using lossy file formatsfit
: for changing the fit of the image within the specified dimensionsdpr
: for adjusting the device pixel ratio of the image
|
|
下面是配置步骤
注册一个账号
创建一个Application,获取Access Key
①创建Application
②全部打钩
③为Application设置一个名称
④复制Access Key
至此取得Access Key
Shortcut快捷指令设置
可以使用或参考我分享的Shortcut,在YOUR_ACCESS_KEY
填入前面复制的KEY。
在Shortcut自动化中添加定时启动这个捷径。
关闭运行前询问,运行更无感。
效果演示
该演示为全程锁屏状态下
|
|