Closed amirsaam closed 2 years ago
as
{"status":200,"data":{"totalSubs":0,"subsInEachSource":{"instagram":0},"failedSources":{"instagram":"Sorry, Substats has been limited by the Instagram API, please try and host Substats on your own Cloudflare Workers account as a workaround."}}}
btw SubStats returns zero for Telegram and Steam Friends too, it worked before but not now.
Both routes are working in the latest version btw, check README, I changed a lot of stuff since earlier this year.
At least Instagram and Steam Friends should be working, Telegram has always worked for my channel :)
ah, I didn't saw the update you merged until a few hours later of my comment. btw as I tried to make it work for https://gist.github.com/spencerwooo/7955aefc4ffa5bc8ae7c83d85d05e7a4 (TermiWidget) but a lot need to change on that widget that I don't have enough knowledge on it to do it.
async function fetchData() {
const apiurl = `https://api.swo.moe/stats`
const url = `${apiurl}/instagram/${instagram}`
const request = new Request(url)
const res = await request.loadJSON()
return res.data.count
}
this returns correct data for the request but I don't know how to implement it for the whole widget. your function fetchData() there has a "data" variable that no longer works with the new changes because you cannot request all datas at once with new api and needs seperate requests.
yes, the current version does not support requesting a list of sources, as it is blocked by an upstream dependency (check README), i will try to get feature parity with the original 1.0 asap after the upstream is resolved.
I updated your TermiWidget iOS btw for SubStats v2 https://github.com/amirsaam/SubCounter-for-Scriptable
can you elaborate?