Coder Social home page Coder Social logo

Add support for named resources about ditto HOT 15 CLOSED

pokeapi avatar pokeapi commented on June 17, 2024
Add support for named resources

from ditto.

Comments (15)

sargunv avatar sargunv commented on June 17, 2024 2

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.

tdmalone avatar tdmalone commented on June 17, 2024 1

As this particular feature has been added to ditto, the downstream parts of this issue are now located:

from ditto.

sargunv avatar sargunv commented on June 17, 2024

e3610d2

from ditto.

sargunv avatar sargunv commented on June 17, 2024

Released v0.6.0: https://pypi.org/project/pokeapi-ditto/0.6.0/

from ditto.

Naramsim avatar Naramsim commented on June 17, 2024

Does it duplicate the files? One for bulbasaur and one for 1?

We could try symlinks

from ditto.

Anu6is avatar Anu6is commented on June 17, 2024

Is there a timeline for this going live?

from ditto.

Anu6is avatar Anu6is commented on June 17, 2024

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.

sargunv avatar sargunv commented on June 17, 2024

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.

tdmalone avatar tdmalone commented on June 17, 2024

@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.

sargunv avatar sargunv commented on June 17, 2024

Need to tweak this to support encounter lists

from ditto.

sargunv avatar sargunv commented on June 17, 2024

Released v0.6.1

from ditto.

jrubinator avatar jrubinator commented on June 17, 2024

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.

cmmartti avatar cmmartti commented on June 17, 2024

Are you having this problem with all resources, or just those particular URLs?

from ditto.

jrubinator avatar jrubinator commented on June 17, 2024

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.

cmmartti avatar cmmartti commented on June 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.