switch to oauth in subredddit about

This commit is contained in:
Andre Medeiros 2022-11-09 13:59:04 -05:00
parent 038db61798
commit e23d47f815

View file

@ -259,7 +259,7 @@ func (rc *Client) SubredditNew(ctx context.Context, subreddit string, opts ...Re
} }
func (rc *Client) SubredditAbout(ctx context.Context, subreddit string, opts ...RequestOption) (*SubredditResponse, error) { func (rc *Client) SubredditAbout(ctx context.Context, subreddit string, opts ...RequestOption) (*SubredditResponse, error) {
url := fmt.Sprintf("https://www.reddit.com/r/%s/about.json", subreddit) url := fmt.Sprintf("https://oauth.reddit.com/r/%s/about.json", subreddit)
opts = append(rc.defaultOpts, opts...) opts = append(rc.defaultOpts, opts...)
opts = append(opts, []RequestOption{ opts = append(opts, []RequestOption{
WithMethod("GET"), WithMethod("GET"),