-
Notifications
You must be signed in to change notification settings - Fork 5
NASA Free API Plugin #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "steps": [ | ||
| { | ||
| "displayName": "Connect to NASA's API", | ||
| "dataStream": { "name": "apodToday" }, | ||
| "required": true, | ||
| "error": "Could not authenticate with NASA's API. Check your API key at api.nasa.gov — DEMO_KEY is shared and may be rate-limited.", | ||
| "success": "Connected to NASA's API successfully." | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [ | ||
| { | ||
| "name": "Near-Earth Object", | ||
| "sourceType": "Near-Earth Object", | ||
| "icon": "meteor", | ||
| "singular": "Near-Earth Object", | ||
| "plural": "Near-Earth Objects" | ||
| }, | ||
| { | ||
| "name": "Space Weather Notification", | ||
| "sourceType": "Space Weather Notification", | ||
| "icon": "sun", | ||
| "singular": "Space Weather Notification", | ||
| "plural": "Space Weather Notifications" | ||
| }, | ||
| { | ||
| "name": "Satellite", | ||
| "sourceType": "Satellite", | ||
| "icon": "satellite", | ||
| "singular": "Satellite", | ||
| "plural": "Satellites" | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| { | ||
| "name": "apodGallery", | ||
| "displayName": "Astronomy Picture of the Day Gallery", | ||
| "description": "Astronomy pictures of the day over a date range", | ||
| "tags": ["Astronomy"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/planetary/apod", | ||
| "getArgs": [ | ||
| { | ||
| "key": "start_date", | ||
| "value": "{{new Date(timeframe.start).toISOString().split('T')[0]}}" | ||
| }, | ||
| { | ||
| "key": "end_date", | ||
| "value": "{{new Date(timeframe.end).toISOString().split('T')[0]}}" | ||
| } | ||
| ] | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "title", "displayName": "Title", "shape": "string", "role": "label" }, | ||
| { "name": "date", "displayName": "Date", "shape": "date", "role": "timestamp" }, | ||
| { "name": "explanation", "displayName": "Explanation", "shape": "string" }, | ||
| { "name": "media_type", "displayName": "Media Type", "shape": "string" }, | ||
| { "name": "url", "displayName": "Media URL", "shape": ["url", { "label": "View" }] }, | ||
| { | ||
| "name": "hdurl", | ||
| "displayName": "HD Image URL", | ||
| "shape": ["url", { "label": "View HD" }], | ||
| "visible": false | ||
| }, | ||
| { "name": "copyright", "displayName": "Copyright", "shape": "string", "visible": false } | ||
| ], | ||
| "timeframes": ["last7days", "last30days", "thisMonth", "lastMonth", "thisQuarter", "thisYear"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "name": "apodToday", | ||
| "displayName": "Astronomy Picture of the Day", | ||
| "description": "The current featured astronomy image or video, with its explanation", | ||
| "tags": ["Astronomy"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/planetary/apod", | ||
| "expandInnerObjects": true | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "title", "displayName": "Title", "shape": "string", "role": "label" }, | ||
| { "name": "date", "displayName": "Date", "shape": "date", "role": "timestamp" }, | ||
| { "name": "explanation", "displayName": "Explanation", "shape": "string" }, | ||
| { "name": "media_type", "displayName": "Media Type", "shape": "string" }, | ||
| { "name": "url", "displayName": "Media URL", "shape": ["url", { "label": "View" }] }, | ||
| { | ||
| "name": "hdurl", | ||
| "displayName": "HD Image URL", | ||
| "shape": ["url", { "label": "View HD" }], | ||
| "visible": false | ||
| }, | ||
| { "name": "copyright", "displayName": "Copyright", "shape": "string", "visible": false } | ||
| ], | ||
| "timeframes": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| { | ||
| "name": "donkiNotifications", | ||
| "displayName": "Space Weather Notifications", | ||
| "description": "Space weather alerts from the last 30 days, covering solar flares, coronal mass ejections, geomagnetic storms and other event types", | ||
| "tags": ["Astronomy", "Alerts"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/DONKI/notifications", | ||
| "getArgs": [ | ||
| { "key": "type", "value": "all" }, | ||
| { | ||
| "key": "startDate", | ||
| "value": "{{new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString().split('T')[0]}}" | ||
| }, | ||
| { "key": "endDate", "value": "{{new Date().toISOString().split('T')[0]}}" } | ||
| ] | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "messageID", "displayName": "Message ID", "shape": "string", "role": "id" }, | ||
| { "name": "messageType", "displayName": "Type", "shape": "string" }, | ||
| { | ||
| "name": "messageIssueTime", | ||
| "displayName": "Issued", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "messageURL", | ||
| "displayName": "Details", | ||
| "shape": ["url", { "label": "View" }], | ||
| "visible": false | ||
| }, | ||
| { "name": "messageBody", "displayName": "Message Body", "shape": "string", "visible": false }, | ||
| { | ||
| "name": "title", | ||
| "displayName": "Notification", | ||
| "computed": true, | ||
| "valueExpression": "{{ $['messageType'] + ' — ' + $['messageIssueTime'].split('T')[0] }}", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "summary", | ||
| "displayName": "Summary", | ||
| "computed": true, | ||
| "valueExpression": "{{ $['messageBody'].substring(0, 300) }}", | ||
| "shape": "string" | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "name": "neoCloseApproaches", | ||
| "displayName": "Near-Earth Object Close Approaches", | ||
| "description": "All known close approaches to Earth (and other bodies) for a near-Earth asteroid, past and future", | ||
| "tags": ["Astronomy"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/neo/rest/v1/neo/{{object.rawId}}", | ||
| "pathToData": "close_approach_data", | ||
| "expandInnerObjects": true | ||
| }, | ||
| "matches": { "sourceType": { "type": "oneOf", "values": ["Near-Earth Object"] } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "close_approach_date", | ||
| "displayName": "Close Approach Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "close_approach_date_full", | ||
| "displayName": "Close Approach Date (Full)", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { "name": "orbiting_body", "displayName": "Orbiting Body", "shape": "string" }, | ||
| { | ||
| "name": "miss_distance.kilometers", | ||
| "displayName": "Miss Distance (km)", | ||
| "shape": ["number", { "thousandsSeparator": true }] | ||
| }, | ||
| { | ||
| "name": "relative_velocity.kilometers_per_hour", | ||
| "displayName": "Relative Velocity (km/h)", | ||
| "shape": ["number", { "thousandsSeparator": true }] | ||
| }, | ||
| { "pattern": ".*" } | ||
| ], | ||
| "timeframes": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| { | ||
| "name": "neoFeed", | ||
| "displayName": "Near-Earth Object Close Approaches", | ||
| "description": "Asteroids with a close approach to Earth in the current 7-day window, one row per asteroid", | ||
| "tags": ["Astronomy"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/neo/rest/v1/feed", | ||
| "getArgs": [ | ||
| { "key": "start_date", "value": "{{new Date().toISOString().split('T')[0]}}" }, | ||
| { | ||
| "key": "end_date", | ||
| "value": "{{new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0]}}" | ||
| } | ||
| ], | ||
| "postRequestScript": "neoFeed.js" | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "id", "displayName": "Asteroid ID", "shape": "string", "role": "id" }, | ||
| { "name": "name", "displayName": "Name", "shape": "string", "role": "label" }, | ||
| { | ||
| "name": "close_approach_date", | ||
| "displayName": "Close Approach Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "miss_distance_km", | ||
| "displayName": "Miss Distance (km)", | ||
| "shape": ["number", { "thousandsSeparator": true }] | ||
| }, | ||
| { | ||
| "name": "relative_velocity_kph", | ||
| "displayName": "Relative Velocity (km/h)", | ||
| "shape": ["number", { "thousandsSeparator": true }] | ||
| }, | ||
| { | ||
| "name": "is_potentially_hazardous_asteroid", | ||
| "displayName": "Potentially Hazardous", | ||
| "shape": "boolean" | ||
| }, | ||
| { "name": "is_sentry_object", "displayName": "Sentry Object", "shape": "boolean" }, | ||
| { | ||
| "name": "absolute_magnitude_h", | ||
| "displayName": "Absolute Magnitude (H)", | ||
| "shape": ["number", { "decimalPlaces": 2 }] | ||
| }, | ||
| { | ||
| "name": "estimated_diameter_min_km", | ||
| "displayName": "Est. Diameter Min (km)", | ||
| "shape": ["number", { "decimalPlaces": 3 }] | ||
| }, | ||
| { | ||
| "name": "estimated_diameter_max_km", | ||
| "displayName": "Est. Diameter Max (km)", | ||
| "shape": ["number", { "decimalPlaces": 3 }] | ||
| }, | ||
| { "name": "orbiting_body", "displayName": "Orbiting Body", "shape": "string" }, | ||
| { | ||
| "name": "nasa_jpl_url", | ||
| "displayName": "JPL Details", | ||
| "shape": ["url", { "label": "View" }], | ||
| "visible": false | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| { | ||
| "name": "neoSummary", | ||
| "displayName": "Near-Earth Object Summary", | ||
| "description": "Current attributes of a near-Earth asteroid, including size, hazard classification and Sentry monitoring status", | ||
| "tags": ["Astronomy"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/neo/rest/v1/neo/{{object.rawId}}", | ||
| "postRequestScript": "neoSummary.js" | ||
| }, | ||
| "matches": { "sourceType": { "type": "oneOf", "values": ["Near-Earth Object"] } }, | ||
| "metadata": [ | ||
| { "name": "id", "displayName": "Asteroid ID", "shape": "string", "visible": false }, | ||
| { "name": "name", "displayName": "Name", "shape": "string", "role": "label" }, | ||
| { | ||
| "name": "absolute_magnitude_h", | ||
| "displayName": "Absolute Magnitude (H)", | ||
| "shape": ["number", { "decimalPlaces": 2 }] | ||
| }, | ||
| { | ||
| "name": "is_potentially_hazardous_asteroid", | ||
| "displayName": "Potentially Hazardous", | ||
| "shape": "boolean" | ||
| }, | ||
| { "name": "is_sentry_object", "displayName": "Sentry Object", "shape": "boolean" }, | ||
| { | ||
| "name": "nasa_jpl_url", | ||
| "displayName": "JPL Details", | ||
| "shape": ["url", { "label": "View" }], | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "estimated_diameter_min_km", | ||
| "displayName": "Est. Diameter Min (km)", | ||
| "shape": ["number", { "decimalPlaces": 3 }] | ||
| }, | ||
| { | ||
| "name": "estimated_diameter_max_km", | ||
| "displayName": "Est. Diameter Max (km)", | ||
| "shape": ["number", { "decimalPlaces": 3 }] | ||
| }, | ||
| { | ||
| "name": "close_approach_count", | ||
| "displayName": "Close Approach Count", | ||
| "shape": "number" | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "name": "satelliteLocation", | ||
| "displayName": "Satellite Location", | ||
| "description": "GSE coordinate position of a satellite over time", | ||
| "tags": ["Astronomy"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Check ui.json for a scope parameter related to satelliteLocation and its objectLimit setting.
# Find ui.json in the NASA plugin directory
fd -t f "ui.json" plugins/NASA/v1/ --exec cat -n {}Repository: squaredup/plugins Length of output: 596 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- plugins/NASA/v1/dataStreams/satelliteLocation.json ---'
cat -n plugins/NASA/v1/dataStreams/satelliteLocation.json
echo
echo '--- scoped streams with httpRequestScopedSingle and objectLimit in plugins/NASA/v1/dataStreams ---'
rg -n '"baseDataSourceName"\s*:\s*"httpRequestScopedSingle"|"objectLimit"\s*:' plugins/NASA/v1/dataStreamsRepository: squaredup/plugins Length of output: 3364 Add 🤖 Prompt for AI AgentsSource: Learnings |
||
| "config": { | ||
| "baseUrl": "https://sscweb.gsfc.nasa.gov/WS/sscr/2", | ||
| "httpMethod": "post", | ||
| "endpointPath": "/locations", | ||
| "headers": [ | ||
| { "key": "Accept", "value": "application/json" }, | ||
| { "key": "Content-Type", "value": "application/json" } | ||
| ], | ||
| "postBody": "[\"gov.nasa.gsfc.sscweb.schema.DataRequest\", {\"TimeInterval\": [\"gov.nasa.gsfc.sscweb.schema.TimeInterval\", {\"Start\": [\"javax.xml.datatype.XMLGregorianCalendar\", \"{{timeframe.start}}\"], \"End\": [\"javax.xml.datatype.XMLGregorianCalendar\", \"{{timeframe.end}}\"]}], \"Satellites\": [\"java.util.ArrayList\", [[\"gov.nasa.gsfc.sscweb.schema.SatelliteSpecification\", {\"Id\": \"{{object.rawId}}\", \"ResolutionFactor\": 1}]]], \"OutputOptions\": [\"gov.nasa.gsfc.sscweb.schema.OutputOptions\", {\"AllLocationFilters\": false, \"CoordinateOptions\": [\"java.util.ArrayList\", [[\"gov.nasa.gsfc.sscweb.schema.FilteredCoordinateOptions\", {\"CoordinateSystem\": \"GSE\", \"Component\": \"X\"}], [\"gov.nasa.gsfc.sscweb.schema.FilteredCoordinateOptions\", {\"CoordinateSystem\": \"GSE\", \"Component\": \"Y\"}], [\"gov.nasa.gsfc.sscweb.schema.FilteredCoordinateOptions\", {\"CoordinateSystem\": \"GSE\", \"Component\": \"Z\"}]]], \"MinMaxPoints\": 2}]}]", | ||
| "postRequestScript": "satelliteLocation.js" | ||
| }, | ||
| "matches": { "sourceType": { "type": "oneOf", "values": ["Satellite"] } }, | ||
| "metadata": [ | ||
| { "name": "time", "displayName": "Time", "shape": "date", "role": "timestamp" }, | ||
| { | ||
| "name": "x", | ||
| "displayName": "X (km)", | ||
| "shape": ["number", { "decimalPlaces": 2 }] | ||
| }, | ||
| { | ||
| "name": "y", | ||
| "displayName": "Y (km)", | ||
| "shape": ["number", { "decimalPlaces": 2 }] | ||
| }, | ||
| { | ||
| "name": "z", | ||
| "displayName": "Z (km)", | ||
| "shape": ["number", { "decimalPlaces": 2 }] | ||
| }, | ||
| { | ||
| "name": "coordinateSystem", | ||
| "displayName": "Coordinate System", | ||
| "shape": "string", | ||
| "visible": false | ||
| } | ||
| ], | ||
| "timeframes": ["last1hour", "last12hours", "last24hours", "last7days"] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "name": "satellites", | ||
| "displayName": "Actively Tracked Satellites", | ||
| "description": "Satellites and spacecraft currently tracked by NASA's Satellite Situation Center", | ||
| "tags": ["Astronomy"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "baseUrl": "https://sscweb.gsfc.nasa.gov/WS/sscr/2", | ||
| "httpMethod": "get", | ||
| "endpointPath": "/observatories", | ||
| "headers": [{ "key": "Accept", "value": "application/json" }], | ||
| "postRequestScript": "satellites.js" | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "id", "displayName": "SSC ID", "shape": "string", "visible": false }, | ||
| { "name": "name", "displayName": "Name", "shape": "string", "role": "label" }, | ||
| { | ||
| "name": "resolution", | ||
| "displayName": "Native Resolution (s)", | ||
| "shape": "number" | ||
| }, | ||
| { "name": "startTime", "displayName": "Tracking Start", "shape": "date" }, | ||
| { "name": "endTime", "displayName": "Tracking End", "shape": "date" }, | ||
| { | ||
| "name": "resourceId", | ||
| "displayName": "SPASE Resource ID", | ||
| "shape": "string", | ||
| "visible": false | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
What is the maximum date range for the NASA NeoWs feed endpoint (/neo/rest/v1/feed)? Does it count the range inclusively or exclusively?💡 Result:
The maximum date range for the NASA NeoWs feed endpoint (/neo/rest/v1/feed) is 7 days [1][2][3][4]. While some earlier documentation or external sources might have occasionally cited different limits, the consensus among technical documentation is that the API restricts queries to a span of no more than 7 days [1][2][3][5][4]. Regarding inclusivity, the date range is inclusive of both the start_date and the end_date [5][6]. When you perform a request, the API returns near-Earth object data for the entire duration of the specified range, including all records from the start and end dates provided in the query parameters [5].
Citations:
🏁 Script executed:
Repository: squaredup/plugins
Length of output: 3427
Cap the NeoWs feed window at 6 days
start_datetoend_dateis inclusive, sotoday + 7requests 8 calendar days and can return a 400. Usetoday + 6instead.🤖 Prompt for AI Agents