Package gogyazo proivdes structs and functions for accessing Gyazo API.
OAUTH2_GYAZO_CLIENT_ID
OAUTH2_GYAZO_CLIENT_SECRET
OAUTH2_GYAZO_REDIRECT_URI
- Register an application at https://gyazo.com/oauth/applications
- Set the client_id, client_secret and return_uri as above environment variables
- Run
go run cmd/getAccessToken/main.go
to get the authentication URL - Open the URL with a web browser, sign-in if you didn't, authorizes the app, and you'll be redirect to ${return_uri}?code=${authcode}
- Run `go run cmd/getAccessToken/main.go --code=${authcode}, then access token will be shown.
Once you follow the steps, you'll have cache.json
file, in which access token is stored.
Run go run cmd/getImages/main.go