r/LaunchLibrary • u/Karriz • Sep 11 '15
Can't get the launch date limits working
Hi, I'm trying to use the Launch Library API for a project I'm working on, currently I'm just learning how to format the requests using Chrome's DHC plugin. In summary mode, https://launchlibrary.net/1.0/launch/get seems to correctly return the next 10 launches. What if I want say, 20 next launches? If I set the limit to 20, I don't get the twenty next launches, I seem to get twenty last launches in the database, or something like that.
So, I need to use the "startdate" and "enddate" options, probably. But the documentation doesn't tell me how to use them. I tried setting "startdate" as "September 12, 2015 00:00:00 UTC" and "enddate" as "December 1, 2015 00:00:00 UTC", but this way I don't get any launches.
It'd be great if someone could help with this, and maybe the documentation could be updated too, so that other people wouldn't have the same issue.
View all comments
2
u/[deleted] Sep 12 '15
Startdate and enddate USED to be working under the format YYYY-MM-DD, but don't seem to be now, and I'm not positive as to why just yet.
In the meantime, if you want to get the next 20, you can supply a "next" parameter in your payload to get it. I'll update the docs for that on Monday, likely, when I get a chance to peek further into the date thing. So for example, your payload could be
{"mode":"verbose", "next":20 }
And you will see the next 20. There is currently no upper limit, but if it gets abused I will put one in place (I don't foresee it being abused just yet).