From 7d7ccc3139247b3a9d997698d9ce16f5a8784050 Mon Sep 17 00:00:00 2001 From: Boutade Date: Mon, 23 Sep 2019 09:57:52 -0500 Subject: initial commit --- granolin.lisp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 granolin.lisp (limited to 'granolin.lisp') diff --git a/granolin.lisp b/granolin.lisp new file mode 100644 index 0000000..8179a66 --- /dev/null +++ b/granolin.lisp @@ -0,0 +1,39 @@ + +;;;; granolin.lisp + +(in-package #:granolin) + +;;; Login https://matrix.org/docs/spec/client_server/r0.5.0#id242 +;;; Media Upload https://matrix.org/docs/spec/client_server/r0.5.0#post-matrix-media-r0-upload + + + +(defclass client () + ((access-token + :reader login + :initarg :login + :initform (error "Clients need an access token.")) + (homeserver + :reader homeserver + :initarg :homeserver + :initform (error "Clients require a homeserver.")) + (rooms + :accessor rooms + :initform nil) + (users + :accessor users + :initform nil))) +;;TODO add things like transaction ids and time points + + +(defmethod initialize-instance :after ((client client) &key) + ;; fetch rooms + ;; fetch users + ;; fetch any other state that might be useful + ) + +;;; Sending Room Messages +(defgeneric send-message (client room msg) + (:documentation "Ends up sending an http request to the client's homeserver")) + + -- cgit v1.2.3