lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.64k stars 2.28k forks source link

Streamer Status and Stream URL in /api/user/{username} #13442

Closed SJBFAN closed 1 year ago

SJBFAN commented 1 year ago

Issue: Streamer Status and Streamer URL not available in /api/user/{username} endpoint

Usage: I am building a discord bot that enables users to get a profile card of a lichess user in chat. Some info such as Name, Patron Status and Ratings are available in the /api/user/{username} endpoint but unfortunately not the streamer status nor the streamer's URL (if streamer status is true).

I searched and found ways to get currently live streamers but that does not help as I want to display someone's streamer status as well as their Twitch/YouTube link even when they are not live.

Wondering if it can be added to this endpoint so that streamers are properly recognized in their profile cards.

An example built using the chess.com API is shown below for Hikaru's profile. See the Twitch link is embedded: image

Apologies for formatting as I am new to GitHub and coding

ornicar commented 1 year ago

There already exists a streaming field documented at https://lichess.org/api#tag/Users/operation/apiUser.

I'll add links to the twitch & youtube channels.