diff options
author | Johnson Denen <johnson.denen@gmail.com> | 2017-04-08 07:23:07 -0400 |
---|---|---|
committer | jdenen <Johnson.Denen@ascenaretail.com> | 2017-04-09 08:55:36 -0400 |
commit | 96f4b3627b3cbb38b28ba07206fb6196e71e212a (patch) | |
tree | d4229a2dbfa8890fbddf6990beefe5498d9c524f /lisp/mastodon.el | |
parent | 1457f9f5cd435d395b474e1cdc0949e387e0665c (diff) |
Refactor authorization
Diffstat (limited to 'lisp/mastodon.el')
-rw-r--r-- | lisp/mastodon.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/mastodon.el b/lisp/mastodon.el index b3946f8..0103615 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -1,7 +1,5 @@ -(load-file "mastodon-auth.el") -(load-file "mastodon-http.el") - -(defvar mastodon--api-version "v1") +(defgroup mastodon nil + "Interface with Mastodon.") (defcustom mastodon-instance-url "https://mastodon.social" "Base URL for the Masto instance from which you toot." @@ -14,10 +12,13 @@ :group 'mastodon :type 'file) -(defvar mastodon--client-plist (mastodon--read-access-token-file) - "Stores CLIENT_ID, CLIENT_SECRET, and ACCESS_TOKEN. +(defvar mastodon--api-version "v1") -Reads values from `mastodon-token-file' if they exist.") +;;;###autoload +(defun mastodon () + (interactive) + (load-file "mastodon-http.el") + (load-file "mastodon-auth.el") + (load-file "mastodon-toot.el")) -(defvar mastodon--token (mastodon--read-or-get-access-token) - "API token for Mastodon.") +(provide 'mastodon) |