[core] Use app-access-tokens for stream info

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-07-27 12:38:50 +02:00
parent 3f64d60c43
commit 76e72e8148
Signed by: luzifer
GPG Key ID: D91C3E91E4CAD6F5

View File

@ -44,7 +44,7 @@ func (c *Client) GetCurrentStreamInfo(username string) (*StreamInfo, error) {
} }
if err := c.Request(ClientRequestOpts{ if err := c.Request(ClientRequestOpts{
AuthType: AuthTypeBearerToken, AuthType: AuthTypeAppAccessToken,
Context: context.Background(), Context: context.Background(),
Method: http.MethodGet, Method: http.MethodGet,
OKStatus: http.StatusOK, OKStatus: http.StatusOK,
@ -85,7 +85,7 @@ func (c *Client) GetRecentStreamInfo(username string) (string, string, error) {
} }
if err := c.Request(ClientRequestOpts{ if err := c.Request(ClientRequestOpts{
AuthType: AuthTypeBearerToken, AuthType: AuthTypeAppAccessToken,
Context: context.Background(), Context: context.Background(),
Method: http.MethodGet, Method: http.MethodGet,
OKStatus: http.StatusOK, OKStatus: http.StatusOK,
@ -120,7 +120,7 @@ func (c *Client) HasLiveStream(username string) (bool, error) {
} }
if err := c.Request(ClientRequestOpts{ if err := c.Request(ClientRequestOpts{
AuthType: AuthTypeBearerToken, AuthType: AuthTypeAppAccessToken,
Context: context.Background(), Context: context.Background(),
Method: http.MethodGet, Method: http.MethodGet,
OKStatus: http.StatusOK, OKStatus: http.StatusOK,