refactor: split satellite and launch provider modules

This commit is contained in:
Sameh Khamis committed 2026-09-11 21:22:15 -07:00
1 parent bbabba89bf
commit 9a4b98700e
12 files changed
+417 -248

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
/** Fixed upstream request URLs; callers own validation, credentials and transport. */
export function celestrakTleUrl(group) {
const url = new URL('https://celestrak.org/NORAD/elements/gp.php');
url.searchParams.set('GROUP', group);
url.searchParams.set('FORMAT', 'tle');
return url;
}
export function launchLibraryRecentUrl(end) {
const start = new Date(end.getTime() - 30 * 86400000);
const url = new URL('https://ll.thespacedevs.com/2.3.0/launches/');
url.searchParams.set('net__gte', start.toISOString());
url.searchParams.set('net__lte', end.toISOString());
url.searchParams.set('limit', '100');
url.searchParams.set('mode', 'detailed');
return url;
}