json.stringify

master
Martin Zwigl 2025-03-08 01:15:00 +01:00
parent e108342554
commit 0cfd65b919
2 changed files with 4 additions and 4 deletions

View File

@ -25,16 +25,16 @@
})
.then(cmcResult => {
// text: JSON.parse(cmcResult.resp).data["1"].symbol, // Fixed data path
logFile.write(cmcResult.toString());
logFile.write("HTTP resp:" + JSON.stringify(cmcResult));
const apiData = JSON.parse(cmcResult.resp); // Correctly declare variable
logFile.write(apiData.toString());
logFile.write("data:" + JSON.stringify(apiData));
return {
text: apiData.symbol,
img: COIN_ICON
};
})
.catch(err => {
logFile.write("API Error: " + err.toString());
logFile.write("API Error: " + JSON.stringify(err));
return {
text: err.toString(),
img: COIN_ICON

View File

@ -1,7 +1,7 @@
{ "id": "coin_info",
"name": "Crypto-Coins Info",
"shortName":"Coins Info",
"version": "0.04.23",
"version": "0.04.24",
"description": "Crypto-Coins Infos with the help of the Coinmarketcap API",
"icon": "app.png",
"tags": "clkinfo",