Comments (15)
The named resources aren't dependent on rebuilding API data. They're generated from the api-data we already have using ditto transform --base-url="$BASE_URL" --src-dir='data' --dest-dir='_dist'
from the api-data repo.
But yeah, there are issues with rebuilding api-data atm.
from ditto.
As this particular feature has been added to ditto, the downstream parts of this issue are now located:
- PokeAPI/pokeapi#373 (getting named resources on current hosting)
- PokeAPI/api-data#9 (rebuilding api-data)
from ditto.
from ditto.
Released v0.6.0: https://pypi.org/project/pokeapi-ditto/0.6.0/
from ditto.
Does it duplicate the files? One for bulbasaur and one for 1?
We could try symlinks
from ditto.
Is there a timeline for this going live?
from ditto.
Side note: There are a few other named resource end points that were not covered for example
https://pokeapi.co/api/v2/move/{name}/
https://pokeapi.co/api/v2/pokemon-species/{name}
etc.
from ditto.
This hasn't gone live yet; we've hit a snag with Netlify. We have a workaround in place just for pokemon, but this will work for all endpoints once it's live.
from ditto.
@sargunv If we can build api-data, we can get it live on DO - ie that’s not affected by the Netlify build timeout. But we can’t rebuild api-data because of the issue affecting the Django install, right?
from ditto.
Need to tweak this to support encounter lists
- https://pokeapi.co/api/v2/pokemon/129/encounters/
- https://pokeapi.co/api/v2/pokemon/magikarp/encounters/
from ditto.
Released v0.6.1
from ditto.
I think this fix is making eg. pokemon/ditto/
work, but is preventing it from serving requests without the trailing slash, eg. pokemon/ditto
or pokemon/1
from ditto.
Are you having this problem with all resources, or just those particular URLs?
from ditto.
Ach, I mis-diagnosed this - it actually returns a 301
, which confuses things that don't follow redirects (including the example search at https://pokeapi.co/, which helpfully reports "TypeError: Network request failed")
from ditto.
Yeah, that the API explorer requires trailing slashes is a known problem (the cryptic error messages don't help either). The website just got a rewrite in anticipation of the move to static hosting, so there are still a few kinks to work out.
Ideally, requests both with and without a trailing slash will be accepted and return 200 responses, and that's the way it will be once the move to static hosting is complete.
from ditto.
Related Issues (20)
- CORS Headers HOT 1
- Optimize the generated schema
- Generate an API spec
- Investigate performance of clone HOT 1
- Replace dynamic URL placement with a guided solution
- Use pathlib wherever appropriate HOT 2
- Needed CLI flags HOT 1
- Name conflict HOT 1
- Supporting v1 of PokeAPI HOT 13
- Where to host the ditto updater bot HOT 9
- Netlify is returning an object describing the site instead of our API result HOT 8
- Configure CI and add tests
- Configure code review flow
- JSONs minification HOT 2
- Publish to PyPi HOT 2
- Docker Compose build fails using python alpine image
- Different Pokemon Forms dont have formatted Names. HOT 1
- Alternative file structure HOT 3
- Set up a regular job to update data automatically HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ditto.