Table of Contents
Description
OAuth2 request package interface.
Install
Sample install code using leaf.el.
(leaf oauth2-request :ensure t)
Usage
- Get
token
using oauth2 package.(setq token (let ((auth-url "https://accounts.google.com/o/oauth2/auth") (token-url "https://www.googleapis.com/oauth2/v3/token") (client-id "000000000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com") (client-secret "xxxxxxxxxxxxxxxxxxxxxxxx") (scope "https://www.googleapis.com/auth/calendar")) (oauth2-auth-and-store auth-url token-url scope client-id client-secret)))
- Request API using
oauth2-request
oroauth2-request-synchronously
as request package wrapper.(oauth2-request token "https://www.googleapis.com/calendar/v3/users/me/calendarList" :complete (cl-function (lambda (&key response &allow-other-keys) (with-current-buffer (generate-new-buffer "*oauth2-request*") (insert (pp-to-string response)) (newline) (insert (request-response-data response)) (display-buffer (current-buffer))))))
Customize
Information
Community
Any feedback or suggestions are welcome!
You can use github issues, but you can also use Slack if you want a more casual conversation.
Contribution
We welcome PR!
Require tools for testing
- keg
cd ~/ hub clone conao3/keg .keg export PATH="$HOME/.keg/bin:$PATH"
Running test
Below operation flow is recommended.
git branch [feature-branch] # Create branch named [feature-branch]
git checkout [feature-branch] # Checkout branch named [feature-branch]
# <edit loop>
emacs oauth2-request.el # Edit something you want
make test # Test oauth2-request
git commit -am "brabra" # Commit (auto-run test before commit)
# </edit loop>
hub fork # Create fork at GitHub
git push [user] [feature-branch] # Push feature-branch to your fork
hub pull-request # Create pull-request
Migration
License
General Public License Version 3 (GPLv3) Copyright (c) Naoya Yamashita - https://conao3.com https://github.com/conao3/oauth2-request.el/blob/master/LICENSE
Author
- Naoya Yamashita (conao3)