Skip to content

Commit

Permalink
chore: rename ScriptApp to Script
Browse files Browse the repository at this point in the history
This is the lingo reddit documentation uses

vartanbeno#44
  • Loading branch information
bevzzz committed Apr 6, 2023
1 parent 1b794fa commit b3ff447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion reddit/reddit-oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func oauthTransport(client *Client) (*oauth2.Transport, error) {
transport := &oauth2.Transport{Base: client.client.Transport}

switch client.appType {
case ScriptApp:
case Script:
transport.Source = oauth2.ReuseTokenSource(nil, &oauthTokenSource{
ctx: ctx,
config: config,
Expand Down
4 changes: 2 additions & 2 deletions reddit/reddit.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
type AppType int

const (
ScriptApp AppType = iota // default to "Script app" for compatibility
Script AppType = iota // default to "Script" for backward compatibility
WebApp
)

Expand Down Expand Up @@ -129,7 +129,7 @@ func newClient() *Client {
baseURL, _ := url.Parse(defaultBaseURL)
tokenURL, _ := url.Parse(defaultTokenURL)

client := &Client{client: &http.Client{}, BaseURL: baseURL, TokenURL: tokenURL, appType: ScriptApp}
client := &Client{client: &http.Client{}, BaseURL: baseURL, TokenURL: tokenURL, appType: Script}

client.Account = &AccountService{client: client}
client.Collection = &CollectionService{client: client}
Expand Down

0 comments on commit b3ff447

Please sign in to comment.