branch: externals/srht commit 235929a7a6d85be52b65f281f836824ccded130d Author: Aleksandr Vityazev <avitya...@posteo.org> Commit: Aleksandr Vityazev <avitya...@posteo.org>
Update README. --- README.md | 16 ++++++++++++++++ README.org | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/README.md b/README.md index f75466b07e..03e65c3dc7 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,19 @@ # About GNU Emacs [sourcehut](https://sr.ht) API client. + + +# Setup + +To use this client, you need to [generate](https://meta.sr.ht/oauth/personal-token) a personal access token. This token +will have unrestricted access to all sr.ht APIs and can be used like a normal +access token to authenticate API requests. + +After creating the token: + + (setq srht-token TOKEN) + +It is also possible to store the token using auth-source.el, the host must be +set to paste.sr.ht. + + machine paste.sr.ht password TOKEN diff --git a/README.org b/README.org index c5585fda0c..3a090c3c9c 100644 --- a/README.org +++ b/README.org @@ -3,3 +3,22 @@ * About GNU Emacs [[https://sr.ht][sourcehut]] API client. + +* Setup + +To use this client, you need to [[https://meta.sr.ht/oauth/personal-token][generate]] a personal access token. This token +will have unrestricted access to all sr.ht APIs and can be used like a normal +access token to authenticate API requests. + +After creating the token: + +#+begin_src elisp :lexical t +(setq srht-token TOKEN) +#+end_src + +It is also possible to store the token using `auth-source.el', the host must be +set to paste.sr.ht. + +#+begin_example +machine paste.sr.ht password TOKEN +#+end_example