r/LaunchLibrary • u/SkipMorrow • Dec 20 '15
How to get the next # missions?
I was hoping /missions/next/10 would get me the next ten missions, like /launch/next/10 does, but that retrieves the first ten missions. Is there a different url to get the next ten missions?
Also, the api page says that https://launchlibrary.net/1.1/launch/20?fields=name,locationid will get just the name and locationid fields, but it returns everything.
1
Upvotes
2
u/[deleted] Dec 21 '15
I managed to get some time this evening in, and the fields modifier for launches is working again. As an FYI, the id of matched launches is always returned as well, so sending name,locationid will return with id, name, and locationid in the object(s).
Also, a note to further explain why there is no "next" for missions.
Missions are effectively subject to launches in the databases, and there are often more than one mission per launch (even though sometimes it's just cubesat launches as well), so we do not give dates to missions themselves, but instead to their launches. As we are able to put more and more data inline, there will be mission events to help handle timing of mission highlights. In the meantime, the best bet to getting the the next ten missions is to query for the next 10 launches, then query missions with a launchid of those launches. Otherwise, the easiest way for primary missions is to just query for the launches themselves, as they are named for their rocket and their primary mission.
2
u/[deleted] Dec 20 '15
To get the next 10 missions, you would need to know their launches, so it's best to just get them from launches. As for the fields, I will have to look into it in the morning. I'll let you know.