-
-
Notifications
You must be signed in to change notification settings - Fork 969
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
Is there an endpoint that returns a pokemon's image as in the game's pokedex? #346
Comments
https://github.com/PokeAPI/sprites https://pokeapi.co/api/v2/pokemon/23/ -> look in sprites |
@sashafirsov, cool implementation. Would you be willing to port it at our official repo? |
@Naramsim, there are technical challenges in publishing the pokeApi sprites original repo you most likely aware of. I have to remove all PNG( ~5Gb) files in fork https://github.com/sashafirsov/pokeapi-sprites Looking into popularity of https://github.com/PokeAPI/sprites such removal from original project does not look possible unless the PNG generation could be moved into separate repo or build step. While publishing to npmjs.com is still possible by making PNG excluded from package, I am not sure about happiness of npm users from github url From another side, I do not see the PNGs as valuable resource as most sizes and color variations could be rendered 1:1 by SVGs. The color variations also could be tuned on CSS or rendering level. IMO v3.0 could take this pattern as base and as such would not have restrictions in npm and CDN publishing. If there is an interest in such bold move, we could continue. |
Ahh, I see your point. I didn't know about the limit. Well thanks again :) |
Does this one has a sense to be shared in PokeAPI community? |
It's broken on my side |
CDN link is broken, will fix in a bit. |
https://unpkg.com/[email protected]/src/PokeApi-Explorer.html seems working, looking where in PokeAPI it could be embedded. Perhaps in https://pokeapi.co/ |
I don't know @sashafirsov, I find it a bit difficult to use. What's the exact point you are trying to fix with this tool? |
@Naramsim, the initial intent was to show images from https://github.com/PokeAPI/sprites in relation to API. I had trouble to understand the relation between those images and API and urls in data. With this "API explorer" minimal visualization of data and cross-linking API URLs, it become more clear. While it is not a developer tool for working with API, it is a teaser for API and image consumers. Perhaps embedding or link to REST playground or GraphQL API console could be useful for such audience. Personally I would find such "visual preview" useful as a tab in data preview section of "Try it now" on pokeapi.co Unlike Pokemon Wiki it is not oriented to give full info about pokemon games, just show what API has. It immediately exposed that 1118 pokemon count does not match all 649 images in dreamworld. Which mean I have chosen either a wrong API to list all pokemons( https://pokeapi.co/api/v2/pokemon ) or image library is missing half of assets( https://unpkg.com/browse/pokeapi-sprites/sprites/pokemon/other/dream-world/ ). That was starting point to make a decision whether to use images from https://github.com/PokeAPI/sprites. With 650 "official" it would be OK, unofficial have to be filtered off or SVG images replaced with PNG. "visual preview" could help with finding what data could be used for recognition of non-official and what image to use as substitution. PS. could you describe "difficult to use", please? I assume you had some kind of expectations and it did not match. What it is? |
Hi @sashafirsov, I see what you mean. If we go for such a solution/tool ideally it would be better if it could query every endpoint and that every property is returned. Right now your tool is only returning properties that have a list as a value. I would also use a standard tool, I don't know if API explorers are a thing. The ultimate goal of the tool would be to showcase what is present in each endpoint visually and live. On one side we already have the documentation that allows people to see what's exposed by each endpoint, but the docs aren't live and you cannot try them as you would in Swagger. By difficult to use I meant, difficult to understand. The mechanism that allows you to see and query inner resources tends to produce a lot of output and in the end, the webpage becomes a mess. If your main intent was to list each and every sprite dynamically for a Pokemon, I think it would be better to stick with that goal. Otherwise maybe looking online for some API explorer tool would be much simpler than coding everything in-house. |
For the sprites you are right, we don't have a place where one can see if every |
I too can't find it working in my api. Is there any other alternative for using pokemon images?! |
You can always use; https://assets.pokemon.com/assets/cms2/img/pokedex/detail/{id}.png |
@jayk-gupta Are you looking for the pokemon icons like in a pokedex? Because they do exist: https://github.com/PokeAPI/sprites#icons |
The vector art is awesome, but ends at 649 (https://unpkg.com/[email protected]/sprites/pokemon/other/dream-world/649.svg). Was wondering if there is any repo with vector art of all current pokemon (tall order, I know, and yeah I know it would probably have to come from some game) EDIT: nvm, already mentioned here |
Can't seem to find anything about pokemon icon/image in the documentation or in the object returned listing each pokemon. Are there any for icons and if not, will there be soon?
The text was updated successfully, but these errors were encountered: