https://github.com/alesr/pocketoauth2
Implements a simple authentication client towards the Pocket API
https://github.com/alesr/pocketoauth2
Last synced: 4 months ago
JSON representation
Implements a simple authentication client towards the Pocket API
- Host: GitHub
- URL: https://github.com/alesr/pocketoauth2
- Owner: alesr
- License: apache-2.0
- Created: 2021-12-21T08:34:06.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-11T23:31:22.000Z (over 1 year ago)
- Last Synced: 2025-01-22T18:51:40.345Z (5 months ago)
- Language: Go
- Homepage:
- Size: 1.73 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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)
}
```