A Raycast extension that lets you communicate with Unsplash's API and gives you access to some functions.
https://raycast.com/redirectQ: Why does it ask for a permission when setting a desktop wallpaper?
A: If you haven't granted Raycast the permission to change your desktop wallpaper, this extension will ask for it once.
Q: Where does it save the downloaded images?
A: It uses your Application Support directory as default, which should be at ~/Library/Application Support/com.raycast.macos/extensions/unsplash/.
Q: I set "Download Size" option to a different value but it's always downloading the same images!
A: Well, if Unsplash doesn't return an image URL for the value you selected, or if it returns the same image for all values, the extension simply downloads it. If it's not found, extension will fallback to another value.
Q: Couldn't set the wallpaper using "Set Random Wallpaper" because I rejected the permission request!
A: If you accidentally rejected the initial permission request window, or didn't realize it was from this extension, you'll have to go to your System Preferences > Security & Privacy > Privacy > Automation and grant/tick the System Events permission to Raycast.
Q: Why do we need to authorize?
A: This enables us to get a bearer token with permissions that'll let us access more features of the Unsplash API (e.g. like, dislike, get current user).
Q: Why am I running out of API calls so quick?
A: The extension implements pagination so each "page" counts as another API call. To minimize your use of requests, try a different search query if the first couple of pages do not meet your needs.
More? Feel free to create an issue!
Search images on Unsplash.
Search collections on Unsplash.
View your liked images on Unsplash.
Set a random wallpaper from Unsplash.
Content-Type on the token request, and trimming API keyspath.join, curl -L)photo.links.download_location endpoint on all download-like actions (copy to clipboard, save image, set wallpaper) to properly track downloads with Unsplashutm_source=raycast_unsplash&utm_medium=referral to all outbound links to Unsplash photo pages and author profilesdownload_location field to SearchResult.links typeTypeError: Cannot read properties of null (reading 'useState'))Grid.itemSize / Grid.ItemSize to columns propLikesResult into SearchResult, extended User with optional fieldsOrientationDropdown component used by Search Images and Search CollectionsuseSearch hook — removed intermediate performSearch abstractiongetPreferenceValues calls inside functions to avoid side effects on importReact.FC annotations and noisy section comments throughoutawait on LocalStorage.setItem in likes hooknode_modulesToast would say "Liking" when unlikingnode-fetch