Hi,
Webhooks are nice and I enjoyed especially the webhook from the RGBpong clock from @peekay123.
Now I try to make my own webhook to build a stock ticker app.
my HTTP query is: https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quote%20where%20symbol%20in%20("AAPL")&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=
and it gives this JSON output:
{
query: {
count: 1,
created: "2016-01-04T19:29:02Z",
lang: "en-US",
results: {
quote: {
symbol: "AAPL",
AverageDailyVolume: "43502100",
Change: "-0.3708",
DaysLow: "102.0000",
DaysHigh: "104.9900",
YearLow: "92.0000",
YearHigh: "134.5400",
MarketCapitalization: "584.79B",
LastTradePriceOnly: "104.8892",
DaysRange: "102.0000 - 104.9900",
Name: "Apple Inc.",
Symbol: "AAPL",
Volume: "46979396",
StockExchange: "NMS"
}
}
}
}
I created a file called get_yahoo.json:
{
"event": "get_yahoo",
"url": "https://query.yahooapis.com/v1/public/yql?",
"requestType": "POST",
"headers": null,
"q": "select%20*%20from%20yahoo.finance.quote%20where%20symbol%20in%20(%22AAPL%22)",
"format": "json",
"env": "store%3A%2F%2Fdatatables.org%2Falltableswithkeys",
"callback": null,
"responseTemplate": "{{#results}}{{quote.symbol}}~{{quote.LastTradePriceOnly}}{{/results}}",
"json": null,
"auth": null,
"mydevices": true
}
When I create the webhook with "particle webhook create get_yahoo.json" I get the webhook registered.
When I run "particle publish get_yahoo" I get the following messages in dashboard:
My question is, what am I doing wrong ?
Is it the translation of the URL into the JSON file ?
Is it something else ?
Thanks for helping me out
Rudy