A Common Lisp client library for Mastodon instances. https://shinmera.com/docs/tooter
2025-09-25 12:14:42 +02:00
doc Add announcement (#37) 2022-12-18 19:05:32 +01:00
docs Doc update 2025-08-21 16:48:57 +02:00
.gitattributes Docs! 2018-06-08 17:46:56 +02:00
client.lisp Use subtypep check instead of eq check for ideal class 2025-09-25 12:14:42 +02:00
documentation.lisp get-statuses should be pageinated 2025-07-05 12:12:29 +02:00
LICENSE Update copyright 2023-07-03 19:01:55 +02:00
link-header-parser.lisp Separate out v6 client, clean up a bunch of stuff. 2025-07-12 12:31:26 +02:00
objects.lisp - updated 'source' and 'account' objects to API version 6. 2025-08-05 22:10:58 +02:00
package.lisp - updated 'source' and 'account' objects to API version 6. 2025-08-05 22:10:58 +02:00
queries.lisp Separate out v6 client, clean up a bunch of stuff. 2025-07-12 12:31:26 +02:00
README.md Squashed commit of the following: 2024-10-24 18:40:59 +02:00
staple.ext.lisp Docs! 2018-06-08 17:46:56 +02:00
toolkit.lisp Improve plain-format-html 2025-08-30 16:22:52 +01:00
tooter.asd Doc update 2025-08-21 16:48:57 +02:00
v2.lisp Separate out v2 methods into a file. 2025-07-12 12:14:28 +02:00
v6.lisp - updated 'source' and 'account' objects to API version 6. 2025-08-05 22:10:58 +02:00

About Tooter

This is a client library implementing v1/v2 REST API protocol for Mastodon.

How To

Before you start, you'll need an account on some Mastodon instance. For the purposes of this documentation we'll simply pick mastodon.social. Once you've got Tooter loaded you'll first need to create a client instance.

(defvar *client* (make-instance 'tooter:client
                   :base "https://mastodon.social"
                   :name "My Tooter Test App"))

Once you have a client set up, you need to authorise it against your account so that you can make requests on your behalf.

(tooter:authorize *client*)

This will return an URL as its secondary value. Visit this URL in your browser, click on the authorize button, and copy the code it displays. Then call authorize again using this code.

(tooter:authorize *client* "...")

If everything goes well this should return a fully authorised client instance.

(tooter:account *client*)

From here on out you can make use of the full API Mastodon API. See the definition index below.

(tooter:make-status *client* "Tooter works, woah nelly!")

Persisting Client Settings

Once you have authorised your client, you will probably want to save the information somewhere so that the user doesn't need to re-authorise every time. To do this, simply save the key, secret, and access-token values from the client instance. If those are set, the authorize steps are not needed.

Writing an Application Library

If you write an application on top of Mastodon and would like to offer this as another re-usable library, you should create a subclass of client that automatically provides the proper initargs for the :name and so forth. This ensures that your application is known under the correct name, but still lets the user specify the correct :base.

Official Documentation

The official documentation for the REST API of mastodon can be found here:

https://docs.joinmastodon.org/