Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change to new unsplash api #827

Merged
merged 1 commit into from
Sep 17, 2022
Merged

fix: change to new unsplash api #827

merged 1 commit into from
Sep 17, 2022

Conversation

shabegom
Copy link
Collaborator

@shabegom shabegom commented Sep 14, 2022

This PR changes the old and now deprecated Unsplash API endpoint to the new unsplash API.

Because the new API requires authentication, I created a small express add hosted at https://templater-unsplash.fly.dev/ which acts as a proxy for the unsplash api. This way the Auth Key won't be exposed on the client.

The server-side code can be reviewed here: https://github.com/shabegom/templater-unsplash-proxy

The one potential issue is that the API has a rate limit of 50 images per hour unless you apply for production-level access. Some of the API guidelines make production-level access undesirable. To try and loosely adhere to the guidelines, the text of a random_picture will now include attribution to the photographer.

@shabegom
Copy link
Collaborator Author

fixes #823

@shabegom shabegom merged commit 1e1daa7 into master Sep 17, 2022
shabegom added a commit that referenced this pull request Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant