Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alesr/pocketoauth2

Implements a simple authentication client towards the Pocket API
https://github.com/alesr/pocketoauth2

Last synced: about 2 months ago
JSON representation

Implements a simple authentication client towards the Pocket API

Awesome Lists containing this project

README

        

#POCKETOAUTH2

Implements a simple authentication client towards the Pocket API, including a http server for receiving callbacks for user request token authorization.

```go
func ExampleService() {
authService, err := New("https://getpocket.com/v3", "consumerKey", "http://localhost:8080/auth/callback")
if err != nil {
log.Fatalln(err)
}

accessTkn, username, err := authService.Authenticate(context.Background())
if err != nil {
log.Fatalln(err)
}

fmt.Println("Access token:", accessTkn)
fmt.Println("Username:", username)
}
```