(in-package :phaser.toots) (ignore-errors ;; Don't signal if .env is missing. (.env:load-env (merge-pathnames ".env"))) (defvar *client* (make-instance 'tooter:client :base (uiop:getenv "MASTODON_URL") :name "Newsphaser bot" :key (uiop:getenv "MASTODON_KEY") :secret (uiop:getenv "MASTODON_SECRET") :access-token (uiop:getenv "MASTODON_TOKEN"))) (defun get-timeline (&key (timeline :home) (limit 10) (max-id nil) (min-id nil)) (tooter:timeline *client* timeline :limit limit :max-id max-id :min-id min-id)) (defun get-status (id) (tooter:find-status *client* id)) (defun post-toot (content) (tooter:make-status *client* content))