json.stringify
parent
e108342554
commit
0cfd65b919
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue