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

Enhancement: Updated Sprite URLs returned by API #727

Merged
merged 3 commits into from
Jul 20, 2022

Conversation

LeonEstrak
Copy link
Contributor

Previously the sprite endpoint returned the relative path of
the image with a /media/ prefix which was not useful for API consumer.
Now it returns a URL pointing to the image present in github.com/PokeAPI/Sprites.

Signed-off-by: Aniket Chakraborty [email protected]

Previously the sprite endpoint returned the relative path of
the image with a /media/ prefix which was not useful for API consumer.
Now it returns a URL pointing to the image present in github.com/PokeApi/Sprites.

Signed-off-by: Aniket Chakraborty <[email protected]>
@merfed
Copy link

merfed commented Jun 27, 2022

Github isn't a CDN, whomever is consuming the API should be hosting the sprites themselves.

@LeonEstrak
Copy link
Contributor Author

LeonEstrak commented Jun 27, 2022

Github isn't a CDN, whomever is consuming the API should be hosting the sprites themselves.

Agreed. But that's when we are trying to scale the project. A lot of the API consumers are people like me making small side projects as a hobby. Besides, the /media/ was not useful in any manner, better to have a usable URL.
And If one wishes to scale, the URL can easily be substituted on the consumer end.

@Naramsim
Copy link
Member

Naramsim commented Jul 20, 2022

Hi @LeonEstrak, I cannot replicate your outcome. When building your branch and applying the metadata. I always get null for the sprite URLs Ok, I didn't clone the sprite submodule. Retrying

@Naramsim
Copy link
Member

Cool, it works! Thanks for the PR!

@Naramsim Naramsim self-requested a review July 20, 2022 13:45
@Naramsim Naramsim merged commit 635eb57 into PokeAPI:master Jul 20, 2022
@pokeapi-machine-user
Copy link

A PokeAPI/api-data refresh has started. In 45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data.

The staging branch will be deployed in our staging environment and you will be able to review the entire API.

A Pull Request (master<-staging) will be also created at PokeAPI/api-data and assigned to the PokeAPI Core team to be reviewed. If approved and merged new data will soon be available worldwide at pokeapi.co.

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.

4 participants