From f78ee82f1cab1a95196baa1a564753b753a213ee Mon Sep 17 00:00:00 2001 From: Trevor Fitzgerald Date: Wed, 22 Jan 2025 17:52:49 -0500 Subject: [PATCH] Add ability to have Live streamers --- conf/lila.conf | 4 ++++ conf/nginx.conf | 4 ++++ nginx/static/twitch-streamers.json | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 nginx/static/twitch-streamers.json diff --git a/conf/lila.conf b/conf/lila.conf index 695fc566..5929209f 100644 --- a/conf/lila.conf +++ b/conf/lila.conf @@ -41,3 +41,7 @@ kamon.influxdb.authentication.token = "secret" plan.stripe.keys.public = "pk_test_123" plan.stripe.keys.secret = "sk_test_123" plan.payPal.keys.public = "sb" + +streamer.streaming.twitch.endpoint = "http://nginx/static/twitch-streamers.json" +streamer.streaming.twitch.client_id = "twitch-client-id" +streamer.streaming.twitch.secret = "twitch-secret" diff --git a/conf/nginx.conf b/conf/nginx.conf index a5b97ceb..29be7660 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -35,6 +35,10 @@ server { alias /lila/public/font; } + location /static { + alias /nginx/static; + } + location /websocket/ { internal; diff --git a/nginx/static/twitch-streamers.json b/nginx/static/twitch-streamers.json new file mode 100644 index 00000000..a02da610 --- /dev/null +++ b/nginx/static/twitch-streamers.json @@ -0,0 +1,24 @@ +{ + "data":[ + { + "id":"123456789", + "user_id":"98765", + "user_login":"lichessdotorg", + "user_name":"lichessdotorg", + "game_id":"743", + "game_name":"Chess", + "type":"live", + "title":"Taking challenges on lichess.org", + "tags":["English"], + "viewer_count":78365, + "started_at":"2021-03-10T15:04:21Z", + "language":"en", + "thumbnail_url":"https://static-cdn.jtvnw.net/previews-ttv/live_user_auronplay-{width}x{height}.jpg", + "tag_ids":[], + "is_mature":false + } + ], + "pagination":{ + "cursor":"eyJiIjp7IkN1cnNvciI6ImV5SnpJam8zT0RNMk5TNDBORFF4TlRjMU1UY3hOU3dpWkNJNlptRnNjMlVzSW5RaU9uUnlkV1Y5In0sImEiOnsiQ3Vyc29yIjoiZXlKeklqb3hOVGs0TkM0MU56RXhNekExTVRZNU1ESXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09In19" + } +}