aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon.el
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2017-04-08 07:23:07 -0400
committerjdenen <Johnson.Denen@ascenaretail.com>2017-04-09 08:55:36 -0400
commit96f4b3627b3cbb38b28ba07206fb6196e71e212a (patch)
treed4229a2dbfa8890fbddf6990beefe5498d9c524f /lisp/mastodon.el
parent1457f9f5cd435d395b474e1cdc0949e387e0665c (diff)
Refactor authorization
Diffstat (limited to 'lisp/mastodon.el')
-rw-r--r--lisp/mastodon.el19
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)