Comments (9)
Wiki endpoint is corrected
Would it make sense to only return a single object though? Since there's the possibility for multiple results when you search all cores/caps, wouldn't that lead to inconsistency? Especially if more parameters are added to those endpoints in the future.
from spacex-api.
All caps/cores should return an array, but by definition, if you're getting a single cap/core, IMO it doesn't make sense to return an array, as a serial should point to a single result.
I'll leave it up to you :)
from spacex-api.
from spacex-api.
from spacex-api.
Here's an example of some endpoints taken from https://msdn.microsoft.com/en-us/library/dd203052.aspx
http://i.imgur.com/vLZirxn.jpg
Notice how the single object endpoints say "an individual..." vs. "a collection of..."
from spacex-api.
Ok, I am with you now. Where the requester is expecting only a single object then it should not be an array. But in instances where the user is expecting 'one or more' objects it should always return an array even if there is only one object. E.g if it is a search term endpoint or something like launches/upcoming
from spacex-api.
@HarvsG absolutely. If it's a request for an unknown amount (0, 1, however many) it should (and kind of has to) be an array. But for the case where you're requesting a single object by ID (in this case core or cap serial) it should be a single object
from spacex-api.
from spacex-api.
Glad we all agree, I'll go ahead and merge 👍
from spacex-api.
Related Issues (20)
- Querying launches against a provided array of values HOT 2
- Small patch images now have black backgrounds, no longer transparent HOT 1
- Starlink 3-1 is missing payload HOT 1
- 403 Errors Suddenly HOT 7
- Getting 503 when requesting from Hetzner VPS HOT 2
- launches/query endpoint does not return launch IDs for ship and crew launches
- Hotbird 13F missing
- Future of the project HOT 9
- Incorrect data under "next" endpoint HOT 2
- USSF-4 is still under ‘upcoming’ despite it already happening HOT 1
- Website to add on 'List of known Apps'
- Data Inconsistency
- Is the API abandonned? HOT 3
- New app to add to the list of known apps
- Seems like Starlink API is outdated HOT 2
- spam / broken link
- Space 🌌
- Error in server.js File - Uncaught Exception Handling
- Issues with fetching the YouTube ID for upcoming launches.
- allow users to make queries with "id" key along with "_id"
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 spacex-api.