Cross-streaming-platform API used for the Norwegian streamer directory on LiveStreamNorge
Run npm ci && npm start to get it going.
Reads input from ./people.json and starts scrapin'.
people JSON format:
[
[platform, id, ...optional]
]
"youtube"- id has to be the longUC.....format"dlive""kick""robotstreamer"- third entry is used as username"trovo"- expectsTROVO_CLIENT_IDenvar"twitch"- expectsTWITCH_CLIENT_ID,TWITCH_CLIENT_SECRETenvars"guac""tiktok""angelthump"
A config file (config.json) is loaded using nconf. All secrets are optional; in that case, scraping from these websites will not function.
{
"http": {
"port": "9080",
"ssl": false,
"ssl_port": "9443",
"ssl_cert": "",
"ssl_privkey": ""
},
"twitch": {
"client_id": "",
"client_secret": ""
},
"trovo": {
"client_id": ""
}
}
Exposed endpoints are
/streams· returns JSON objects of scraped data, formatted as:-
{ platform, id, name, avatar, live, title, viewers }
-
/platforms· returns a JSON object of supported platforms/teams· returns an array of stream teams/src· returns license information and link to source code