From ac4312ffc407145f5827f7fbab2300b96074521d Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 10 Oct 2023 12:24:54 +0200 Subject: [PATCH] [core] Expose method to retrieve AppAccessToken in order for libraries to for example instantiate an IGDB client easily Signed-off-by: Knut Ahlers --- pkg/twitch/twitch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/twitch/twitch.go b/pkg/twitch/twitch.go index 02fbacc..53c22f7 100644 --- a/pkg/twitch/twitch.go +++ b/pkg/twitch/twitch.go @@ -236,7 +236,7 @@ func (c *Client) ValidateToken(ctx context.Context, force bool) error { return nil } -func (c *Client) getTwitchAppAccessToken() (string, error) { +func (c *Client) GetTwitchAppAccessToken() (string, error) { if c.appAccessToken != "" { return c.appAccessToken, nil } @@ -307,7 +307,7 @@ func (c *Client) Request(opts ClientRequestOpts) error { // Nothing to do case AuthTypeAppAccessToken: - accessToken, err := c.getTwitchAppAccessToken() + accessToken, err := c.GetTwitchAppAccessToken() if err != nil { return errors.Wrap(err, "getting app-access-token") }