簡體   English   中英

需要 NASA 的 Insights API 為火星天氣應用程序提供一些指導

[英]Need a bit of direction with NASA's Insights API for a Mars weather App

我正在尋找有關NASA 洞察力 API 的幫助。 我可以在我的控制台中看到 object(在某些情況下,我是編碼方面的新手),我只是想獲取壓力數據:PRE min、max、avg 和 sol 鍵。

我真的不知道下一步該怎么做,任何能指出我正確方向的人都會很棒,謝謝。

到目前為止,我已經知道了。 我有一把鑰匙,但只是展示演示。

const BASE_URL = 'https://api.nasa.gov/insight_weather/?api_key=DEMO_KEY&feedtype=json&ver=1.0';


let weather = [];

const $weather = $('#weather');



init ();

function init() {
 getData();
}


function getData() {
$.ajax(BASE_URL)
    .then(function (data) {
        
        console.log(data);
         weather = data;
        render();
    }, function (error) {
        console.log(error);
    });
}

function render () {
   // console.log(weather);
}

試試這個 API。

https://mars.nasa.gov/rss/api/?feed=weather&category=insight_temperature&feedtype=json&ver=1.0

我從https://mars.nasa.gov/insight/weather/得到這個。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM