Use Credentials struct for NewClient
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
@@ -17,9 +17,8 @@ func main() {
|
||||
}
|
||||
|
||||
func run() (err error) {
|
||||
withCredentials := reddit.WithCredentials("id", "secret", "username", "password")
|
||||
|
||||
client, err := reddit.NewClient(withCredentials)
|
||||
credentials := reddit.Credentials{ID: "id", Secret: "secret", Username: "username", Password: "password"}
|
||||
client, err := reddit.NewClient(credentials)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user