Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alesr/pocketoauth2
- Owner: alesr
- License: apache-2.0
- Created: 2021-12-21T08:34:06.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-11T23:31:22.000Z (over 1 year ago)
- Last Synced: 2024-06-20T17:53:59.273Z (7 months ago)
- Language: Go
- Homepage:
- Size: 1.73 MB
- Stars: 0
- 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)
}
```