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