mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 16:50:01 +00:00
[core] Use app-access-tokens for stream info
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
3f64d60c43
commit
76e72e8148
1 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ func (c *Client) GetCurrentStreamInfo(username string) (*StreamInfo, error) {
|
|||
}
|
||||
|
||||
if err := c.Request(ClientRequestOpts{
|
||||
AuthType: AuthTypeBearerToken,
|
||||
AuthType: AuthTypeAppAccessToken,
|
||||
Context: context.Background(),
|
||||
Method: http.MethodGet,
|
||||
OKStatus: http.StatusOK,
|
||||
|
@ -85,7 +85,7 @@ func (c *Client) GetRecentStreamInfo(username string) (string, string, error) {
|
|||
}
|
||||
|
||||
if err := c.Request(ClientRequestOpts{
|
||||
AuthType: AuthTypeBearerToken,
|
||||
AuthType: AuthTypeAppAccessToken,
|
||||
Context: context.Background(),
|
||||
Method: http.MethodGet,
|
||||
OKStatus: http.StatusOK,
|
||||
|
@ -120,7 +120,7 @@ func (c *Client) HasLiveStream(username string) (bool, error) {
|
|||
}
|
||||
|
||||
if err := c.Request(ClientRequestOpts{
|
||||
AuthType: AuthTypeBearerToken,
|
||||
AuthType: AuthTypeAppAccessToken,
|
||||
Context: context.Background(),
|
||||
Method: http.MethodGet,
|
||||
OKStatus: http.StatusOK,
|
||||
|
|
Loading…
Reference in a new issue