mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
refactor: split satellite and launch provider modules
This commit is contained in:
1 parent
bbabba89bf
commit
9a4b98700e
12 files changed
+417
-248
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user