Giter Site home page Giter Site logo

Comments (6)

jeroenboumans avatar jeroenboumans commented on April 29, 2024 1

Whoops, I wasn't aware about the cores entity and what it meant in the context of the rocket. I know now that it's all about the 1st stage? Since these aren't necessarily linked to a specific type of rocket but more to a build, the cores endpoint I specified above can be ignored. Sorry ;-)

from spacex-api.

jakewmeyer avatar jakewmeyer commented on April 29, 2024 1

Changes are live, I'll update the wiki shortly

https://api.spacexdata.com/v2/parts/caps?capsule_id=dragon1

https://api.spacexdata.com/v2/parts/caps?capsule_id=dragon2

from spacex-api.

jakewmeyer avatar jakewmeyer commented on April 29, 2024

First option should be no problem, Don't really know how to aggregate the data to form the second example. I'll look into it further.

Only issue I see is a conflict between different params on the same endpoint, for example:

https://api.spacexdata.com/v2/parts/caps/dragon1
https://api.spacexdata.com/v2/parts/caps/C112

from spacex-api.

jeroenboumans avatar jeroenboumans commented on April 29, 2024

Perhaps a search param, like the following could to the trick:
https://api.spacexdata.com/v2/parts/caps?capsule=dragon1
https://api.spacexdata.com/v2/parts/cores?capsule=dragon1

I've checked the database and I think it can be done by adding capsule_id to the caps part objects and core parts objects. A ...parts/caps?capsule=dragon1 query can then select all capsules/cores containing this capsule_id. This seems like a one-to-many relationship. Correct me if I'm wrong :)

from spacex-api.

jakewmeyer avatar jakewmeyer commented on April 29, 2024

I think I understand now, makes sense to add it to caps. What about cores though?

from spacex-api.

jeroenboumans avatar jeroenboumans commented on April 29, 2024

Thanks Jake!

from spacex-api.

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.