The lunamech-matrix-api Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The lunamech-matrix-api Reference Manual

This is the lunamech-matrix-api Reference Manual, version 0.0.2, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 05:28:32 2022 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Basic implementation of the Matrix API used in LunaMech the Matrix bot.

Lunamech.com

v2

V2 is under active development while v1 is now in maintenance only mode. I suggest all new users use V2. Currently v2 wraps every call in the client-server spec, the spaces api, every call in the synapse admin api and the integrations API (handling OpenID verification).

Important notes

The examples you see for v2 are using Plists, this is no longer the case. You can use the macro with-hash-keys in place of destructuring-bind.

When using an api call like

(make-instance 'rooms%public-rooms/filtered :connection #v13 :include-all-networks nil)

Make sure you check the API documentation to see which slot does what because boolean query parameters are "true" | "false" while the boolean values for json body parameters are t | nil. You might be able to workout which is from the initial value, if its "false" | "true" you know its a query param. Maybe I will implement a translator at some point for the query params.

in object-helpers.lisp there are a variety of objects constructed using keyword arguments, all arguments that default to :ne mean "no encode", these list items are completely ignored.

(defun object%room-filter (&key (not-rooms :ne)(rooms :ne)(ephemeral :ne)
                             (include-leave :ne)(state :ne)(timeline :ne)
                             (account-data :ne))
  (%quick-hash `(("not_rooms" . ,not-rooms)("rooms" . ,rooms)("ephemeral" . ,ephemeral)
                 ("include_leave" . ,include-leave)("state" . ,state)("timeline" . ,timeline)
                 ("account_data" . ,account-data))))

The package is :lunamech-matrix-api/v2.

see api/v2/user-api.lisp for some thin wrappers

see api/v2/object-helpers.lisp for some Matrix object wrappers

see api/v2/section you want/api.lisp for classes

All api calls are instances of a class, simply create an instance with make-instance and then use (call-api <your instance>) to execute. txnId's are automatically added, so dont fill that slot. Make sure that you always provide :connection as an initarg otherwise you will get an error.

There is a little bit of thread safety with a connection object using with-locked-connection this is used when calling password-login and logout and every time a call is made that uses a txn the lock is grabbed to increment the txn and set it that within in the call. Other than that there is no other thread safety, however this is more than v1.

In theory when you use (call-api ) it will error if you are missing some required values, it will also serialize slots are query parameters and path parameters correctly, when you make the object you should be able to see if a required slot is missing in the printed representation of the object in the REPL. You can also see the json, and the potential url.

You can resend the same event and the previous result will be overridden (results are stored in the slot res) and the txn will still be incremented.

cl-json is used to encode all json (body) values.

When encoding query params nil and unbound slots are ignored, if you want something like 'false' then set the slot to false.

Some api calls are 'special' and will have one slot that is declared specialp this just means that the content of this slot is encoded to json and sent rather than the normal slots, if you fail to fill a special slot a condition will be signalled.

A few examples

CL-USER> (ql:quickload :lunamech-matrix-api)
To load "lunamech-matrix-api":
  Load 1 ASDF system:
    lunamech-matrix-api
; Loading "lunamech-matrix-api"

(:LUNAMECH-MATRIX-API)
CL-USER> (in-package #:lunamech-matrix-api/v2)
#<PACKAGE "LUNAMECH-MATRIX-API/V2">
LMAV2> (make-instance 'connection :url "https://"
                                  :api "/_matrix/client/r0/" :username ""
                                  :password "")
#<CONNECTION 
URL: ""
Username: ""
Logged in: NIL
Auth: "Not authorized yet"
Device-id: "No device ID yet"
 {100C35A453}>
LMAV2> (password-login *)
#<CONNECTION 
URL: "https://"
Username: ""
Logged in: T
Auth: #<AUTH {100E4C88E3}>
Device-id: "VIFOADZRRE"
 {100C35A453}>
LMAV2> 

Sending a message to a room from repl

LMAV2> (multiple-value-bind (hash type)
           (object%event/m-room-message "foobarquux")
         (make-instance 'events%put-message-event-into-room
                        :body hash
                        :room-id "<the room id>"
                        :event-type type
                        :connection #v6))
#<EVENTS%PUT-MESSAGE-EVENT-INTO-ROOM 
PUT https://matrix.scyldings.com/_matrix/client/r0/rooms/%21Wom/send/m.room.message/0
Content-Type: application/json; charset=utf-8
JSON: {"msgtype":"m.text","body":"foobarquux"}
MISSING: NONE {100FA9E78B}>
LMAV2> (call-api *)
(:|event_id| "$feWh-tyFUlqzJD0Gamaa0ndszoENf9F0GwJqe5CIChY")
#<EVENTS%PUT-MESSAGE-EVENT-INTO-ROOM 
PUT https://matrix./_matrix/client/r0/rooms/<the room id>/send/m.room.message/1
Content-Type: application/json; charset=utf-8
JSON: {"msgtype":"m.text","body":"foobarquux"}
MISSING: NONE {100FA9E78B}>
LMAV2> 

Retracting that same event

LMAV2> (make-instance 'events%redact-event
                      :reason "Test"
                      :room-id "!WJvFXSrAnfoqNgwqpE:scyldings.com"
                      :event-id (getf * :|event_id|)
                      :connection #v6)
#<EVENTS%REDACT-EVENT 
PUT https://matrix.scyldings.com/_matrix/client/r0/rooms/%2s.com/redact/%24feWh-tyFUlqzJD0Gamaa0ndszoENf9F0GwJqe5CIChY/1
Content-Type: application/json; charset=utf-8
JSON: {"reason":"Test"}
MISSING: NONE {10042E8DDB}>
LMAV2> (call-api *)
(:|event_id| "$Z-19Wv6N1Xm21p0wFBHuqMI-XzWRtqQoX0Vy2GMEEFU")
#<EVENTS%REDACT-EVENT 
PUT https://matrix.scyldings.com/_matrix/client/r0/rooms/s.com/redact/%24feWh-tyFUlqzJD0Gamaa0ndszoENf9F0GwJqe5CIChY/2
Content-Type: application/json; charset=utf-8
JSON: {"reason":"Test"}
MISSING: NONE {10042E8DDB}>
LMAV2> 

Filters and syncing

Make the filter object, this is a normal api object made normally with generate-user-room-filter or (make-instance 'filters%upload ..) You can see an example in filters.lisp, the objects from the spec are in objects.lisp.

LMAV2> (filter-to-remove-receipts-reaction-typing #v13 "@om")
#<FILTERS%UPLOAD 
POST https://matrix..m/_matrix/client/r0/user/%om/filter
Content-Type: application/json; charset=utf-8
JSON: {"event_format":"client","presence":{"not_types":["m.presence"]},"room":{"ephemeral":{"not_types":["m.room.*","m.receipt","m.typing","m.reaction"]}}}
MISSING: NONE {100790EECB}>

Then call (upload-new-filter <key> <filter-object>)

LMAV2> (upload-new-filter :junk-removed *)
(#<FILTER {100790A193}>)

You can now sync using that filter (ofcourse you can sync without a filter).

(sync #v13 :filter "9")

Or using (key-sync )

LMAV2> (key-sync #v13 :junk-removed)
(:|org.matrix.msc2732.device_unused_fallback_key_types| NIL
 :|device_one_time_keys_count| (:|signed_curve25519| 0) :|next_batch|
 "s1694008_20710893_241342_3874091_2715649_2558_1533518_732813_698")

Retrying

Every API call is wrapped with the macro 'with-captured-dex-error' (see api/v2/protocol/call-wrapper.lisp) this macro wraps its body with a bt:with-timeout and catches the bt:timeout and signalling a api-timeout condition, it also catches all other conditions and passes them to a method called %call-condition-handler, a variety of conditions are handled elegantly and are converted into specific subclass of api-error, however if no method is found for the signalled condition then the top-level condition of 'api-error is signalled. The macro also provides a restart called 'try-again', this will execute the body of with-captured-dex-error again. This can be invoked like so:

LMAV2> (handler-bind ((condition (lambda (c) (declare (ignore c))
                                   (print "restarting")
                                   (invoke-restart 'try-again))))
         (with-captured-dex-error (sleep 2)))

"restarting" 
"restarting" 

(by default the timeout is 30 seconds, it was reduced to 1 just for this demonstration)

So for example if you are running a loop where it constantly checks for a new sync, you can wrap that call or worker thread with a handler-bind which invokes restart, perhaps you could try logging in again etc and then restarting the thread where it was without having unwound the stack. You can see the default way conditions signalled by api-calls are handled in the previously mentioned files.

Serializing

You can serialize a connection object so it can be saved to a file like so:


LMAV2> #v1
#<CONNECTION 
URL: "https://matrix..com/_matrix/client/r0/"
Username: ""
Logged in: T
Auth: #<AUTH {10041E6AD3}>
Device-id: "KZCNNOWDTG"
 {1007955553}>
LMAV2> (serialize-connection *)

(:URL "https://matrix..com" :USERNAME "lh" :LOGGED-IN-P T :AUTH
 (:TOKEN "sy7UW") :DEVICE-ID "KZCNNOWDTG"
 :TXN 0 :API "/_matrix/client/r0/" :FILTERS
 ((:KEY :JUNK-REMOVED :ID "9" :LAST-SYNC-STRING NIL :NEXT-SYNC-STRING :NO-VAL))
 :STATUS
 (:NEXT-BATCH
  "s1702228_20900254_263756_3891211_2744250_2560_1540087_736560_698"
  :LATEST-SYNC :NO-VAL)
 :USER-ID "@lunamech:scyldings.com")#<CONNECTION 
URL: "https://matrix./_matrix/client/r0/"
Username: ""
Logged in: T
Auth: #<AUTH {100B9CE233}>
Device-id: "TDCJWNGOHN"
 {100B973E73}>
 

The following slots are serialized by default url username logged-in-p auth device-id txn api filters status user-id

Then restore like so:

LMAV2> (restore-connection *)
#<CONNECTION 
URL: "https://m.com/_matrix/client/r0/"
Username: ""
Logged in: T
Auth: #<AUTH {10031E19C3}>
Device-id: "KZCNNOWDTG"
 {100318FDC3}>

The actual syncs are not restored, only the next-batch is, meaning if you call sync on your restored connection it will sync from your last previous sync, if you want to avoid this and do a completely new sync then you can call dry-sync which will remove the next-batch from your status and call sync normally..

v1

See api/user-api

See api/admin-api

See api/spaces

I have some plans to change the backend to use drakma rather than dex and I might move over to using the MOP for defining new API's. However I am very dependent on the current APIs interface so this will have to stay the same.

LMAPI> (make-instance 'connection :url "<your matrix server address>"
                                  :api "/_matrix/client/r0/" :username "<your username>"
                                  :password "<your password>")
#<CONNECTION 
URL: "https://_matrix/client/r0/"
Username: "lh"
Logged in: NIL
Auth: "Not authorized yet"
Device-id: "No device ID yet"
 {10080B0C43}>
LMAPI> (password-login *)
(:|well_known| (:|m.homeserver| (:|base_url| "htm/"))
 :|device_id| "XLXMACKAFI" :|home_server| "scom" :|access_token|
 "sytdW" :|user_id|
 "@lom")
LMAPI> 
; Returning value 0 of history entry 21
#<CONNECTION 
URL: "https://m.com/_matrix/client/r0/"
Username: "h"
Logged in: T
Auth: #<AUTH {10093A81E3}>
Device-id: "XLXMACKAFI"
 {10080B0C43}>

Now you can pass that connection as the first argument to api calls.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 lunamech-matrix-api

Author

K1D77A

License

MIT

Description

An implementation of the Matrix API taken from LunaMech see https://lunamech.com

Version

0.0.2

Dependencies
Source

lunamech-matrix-api.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 lunamech-matrix-api/v2

Description

Version 2 of the API library.

Dependency

events.lisp (file)

Parent

lunamech-matrix-api (system)

Location

v2/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.2 lunamech-matrix-api/v2/protocol

Description

The MOP protocol

Dependency

serialize.lisp (file)

Parent

v2 (module)

Location

v2/protocol/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.3 lunamech-matrix-api/v2/2

Dependency

conditions.lisp (file)

Parent

v2 (module)

Location

v2/2/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.4 lunamech-matrix-api/v2/4

Dependency

2 (module)

Parent

v2 (module)

Location

v2/4/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.5 lunamech-matrix-api/v2/5

Dependency

4 (module)

Parent

v2 (module)

Location

v2/5/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.6 lunamech-matrix-api/v2/6

Dependency

5 (module)

Parent

v2 (module)

Location

v2/6/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.7 lunamech-matrix-api/v2/8

Dependency

6 (module)

Parent

v2 (module)

Location

v2/8/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.8 lunamech-matrix-api/v2/9

Dependency

8 (module)

Parent

v2 (module)

Location

v2/9/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.9 lunamech-matrix-api/v2/10

Dependency

9 (module)

Parent

v2 (module)

Location

v2/10/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.10 lunamech-matrix-api/v2/11

Dependency

10 (module)

Parent

v2 (module)

Location

v2/11/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.11 lunamech-matrix-api/v2/13

Dependency

11 (module)

Parent

v2 (module)

Location

v2/13/

Component

api.lisp (file)


Next: , Previous: , Up: Modules   [Contents][Index]

3.12 lunamech-matrix-api/v2/admin

Dependency

13 (module)

Parent

v2 (module)

Location

v2/admin/

Component

api.lisp (file)


Previous: , Up: Modules   [Contents][Index]

3.13 lunamech-matrix-api/v2/spaces

Dependency

admin (module)

Parent

v2 (module)

Location

v2/spaces/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 lunamech-matrix-api.asd

Location

/home/quickref/quicklisp/dists/quicklisp/software/lunamech-matrix-api-20220220-git/lunamech-matrix-api.asd

Systems

lunamech-matrix-api (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 lunamech-matrix-api/package.lisp

Parent

lunamech-matrix-api (system)

Location

package.lisp

Packages

lunamech-matrix-api


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 lunamech-matrix-api/classes.lisp

Dependency

package.lisp (file)

Parent

lunamech-matrix-api (system)

Location

classes.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 lunamech-matrix-api/conditions.lisp

Dependency

classes.lisp (file)

Parent

lunamech-matrix-api (system)

Location

conditions.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 lunamech-matrix-api/api-helpers.lisp

Dependency

conditions.lisp (file)

Parent

lunamech-matrix-api (system)

Location

api-helpers.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 lunamech-matrix-api/integration.lisp

Dependency

api-helpers.lisp (file)

Parent

lunamech-matrix-api (system)

Location

integration.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 lunamech-matrix-api/user-api.lisp

Dependency

integration.lisp (file)

Parent

lunamech-matrix-api (system)

Location

user-api.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 lunamech-matrix-api/spaces.lisp

Dependency

user-api.lisp (file)

Parent

lunamech-matrix-api (system)

Location

spaces.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.9 lunamech-matrix-api/sync.lisp

Dependency

spaces.lisp (file)

Parent

lunamech-matrix-api (system)

Location

sync.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.10 lunamech-matrix-api/admin-api.lisp

Dependency

sync.lisp (file)

Parent

lunamech-matrix-api (system)

Location

admin-api.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.11 lunamech-matrix-api/events.lisp

Dependency

admin-api.lisp (file)

Parent

lunamech-matrix-api (system)

Location

events.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.12 lunamech-matrix-api/v2/api-package.lisp

Parent

v2 (module)

Location

v2/api-package.lisp

Packages

lunamech-matrix-api/v2


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.13 lunamech-matrix-api/v2/classes.lisp

Dependency

api-package.lisp (file)

Parent

v2 (module)

Location

v2/classes.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.14 lunamech-matrix-api/v2/helpers.lisp

Dependency

classes.lisp (file)

Parent

v2 (module)

Location

v2/helpers.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.15 lunamech-matrix-api/v2/serialize.lisp

Dependency

helpers.lisp (file)

Parent

v2 (module)

Location

v2/serialize.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.16 lunamech-matrix-api/v2/protocol/classes.lisp

Parent

protocol (module)

Location

v2/protocol/classes.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.17 lunamech-matrix-api/v2/protocol/conditions.lisp

Dependency

classes.lisp (file)

Parent

protocol (module)

Location

v2/protocol/conditions.lisp

Exported Definitions
Internal Definitions

missing-required-data (condition)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.18 lunamech-matrix-api/v2/protocol/call-wrapper.lisp

Dependency

conditions.lisp (file)

Parent

protocol (module)

Location

v2/protocol/call-wrapper.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.19 lunamech-matrix-api/v2/protocol/api-protocol.lisp

Dependency

call-wrapper.lisp (file)

Parent

protocol (module)

Location

v2/protocol/api-protocol.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.20 lunamech-matrix-api/v2/conditions.lisp

Dependency

protocol (module)

Parent

v2 (module)

Location

v2/conditions.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.21 lunamech-matrix-api/v2/2/api.lisp

Parent

2 (module)

Location

v2/2/api.lisp

Exported Definitions

client-versions (class)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.22 lunamech-matrix-api/v2/4/api.lisp

Parent

4 (module)

Location

v2/4/api.lisp

Exported Definitions

discover-domain-info (class)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.23 lunamech-matrix-api/v2/5/api.lisp

Parent

5 (module)

Location

v2/5/api.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.24 lunamech-matrix-api/v2/6/api.lisp

Parent

6 (module)

Location

v2/6/api.lisp

Exported Definitions

get-relevant-capabilities (class)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.25 lunamech-matrix-api/v2/8/api.lisp

Parent

8 (module)

Location

v2/8/api.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.26 lunamech-matrix-api/v2/9/api.lisp

Parent

9 (module)

Location

v2/9/api.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.27 lunamech-matrix-api/v2/10/api.lisp

Parent

10 (module)

Location

v2/10/api.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.28 lunamech-matrix-api/v2/11/api.lisp

Parent

11 (module)

Location

v2/11/api.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.29 lunamech-matrix-api/v2/13/api.lisp

Parent

13 (module)

Location

v2/13/api.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.30 lunamech-matrix-api/v2/admin/api.lisp

Parent

admin (module)

Location

v2/admin/api.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.31 lunamech-matrix-api/v2/spaces/api.lisp

Parent

spaces (module)

Location

v2/spaces/api.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.32 lunamech-matrix-api/v2/spaces/spaces.lisp

Dependency

api.lisp (file)

Parent

spaces (module)

Location

v2/spaces/spaces.lisp

Exported Definitions
Internal Definitions

invite-to-space (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.33 lunamech-matrix-api/v2/object-helpers.lisp

Dependency

spaces (module)

Parent

v2 (module)

Location

v2/object-helpers.lisp

Exported Definitions
Internal Definitions

%clean-alist (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.34 lunamech-matrix-api/v2/filters.lisp

Dependency

object-helpers.lisp (file)

Parent

v2 (module)

Location

v2/filters.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.35 lunamech-matrix-api/v2/integration.lisp

Dependency

filters.lisp (file)

Parent

v2 (module)

Location

v2/integration.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.36 lunamech-matrix-api/v2/sync.lisp

Dependency

integration.lisp (file)

Parent

v2 (module)

Location

v2/sync.lisp

Exported Definitions
Internal Definitions

key-sync (function)


Previous: , Up: Lisp files   [Contents][Index]

4.1.37 lunamech-matrix-api/v2/user-api.lisp

Dependency

sync.lisp (file)

Parent

v2 (module)

Location

v2/user-api.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 lunamech-matrix-api

Source

package.lisp (file)

Nickname

lmapi

Use List

common-lisp

Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

5.2 lunamech-matrix-api/v2

Source

api-package.lisp (file)

Nickname

lmav2

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: auth-req (METHOD CONNECTION URL DATA RESPONSE-VAR &optional PREFIX) &body BODY
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Macro: new-r-t (KEY) &body BODY
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Macro: pkv PLIST KEY
Package

lunamech-matrix-api

Source

conditions.lisp (file)

Macro: with-captured-dex-error &body BODY

Catches any conditions signalled by dex and converts the response into a special condition defined in src/classes.lisp and signals.

Package

lunamech-matrix-api/v2

Source

call-wrapper.lisp (file)

Macro: with-hash-keys KEYS HASH &body BODY

Creates a let binding for each of the keys listed in KEYS in HASH using gethash, each of these KEYS has to have a non nil value otherwise signals ’malformed-json.

Package

lunamech-matrix-api/v2

Source

helpers.lisp (file)

Macro: with-locked-connection (CONNECTION) &body BODY
Package

lunamech-matrix-api/v2

Source

classes.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: %quick-hash ALIST &rest REST &key &allow-other-keys

Takes in an alist and quickly generators a hash

Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: add-filter-id CONNECTION KEY NEW-VAL &optional LAST-SYNC
Package

lunamech-matrix-api/v2

Source

filters.lisp (file)

Function: add-string->condition STRING CONDITION-SYM
Package

lunamech-matrix-api

Source

conditions.lisp (file)

Function: add-to-account-data CONNECTION USER-ID KEY DATA
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: add-to-account-data CONNECTION USER-ID KEY DATA

Add DATA (a hashtable) to the type KEY for USER-ID.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: admin-change-a-users-device-data CONNECTION USER-ID DEVICE-ID DISPLAY-NAME

Queries the admin API. Uses CONNECTION and changes the DISPLAY-NAME of DEVICE-ID associated with USER-ID.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-change-user-to/from-administrator CONNECTION USER-ID TO/FROM

Queries the admin API. Uses CONNECTION and deactivates USER-ID’s account.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-create-or-modify-account CONNECTION USER-ID &optional PASSWORD DISPLAY-NAME AVATAR-URL ADMIN DEACTIVATED

Queries the admin API. Uses CONNECTION and creates or modifies an account
denoted by USER-ID.
user_id: fully-qualified user id: for example, @user:server.com

Body parameters:

password, optional. If provided, the user’s password is updated and all devices are logged out. displayname, optional, defaults to the value of user_id.
threepids, optional, allows setting the third-party IDs (email, msisdn) belonging to a user. avatar_url, optional, must be a MXC URI.
admin, optional, defaults to false.
deactivated, optional, defaults to false.
Threepids is current not supported

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-deactivate-account CONNECTION USER-ID

Queries the admin API. Uses CONNECTION and deactivates USER-ID’s account.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-delete-a-device CONNECTION USER-ID DEVICE-ID

Queries the admin API. Uses CONNECTION and deletes the DEVICE-ID associated with USER-ID.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-delete-a-users-devices CONNECTION USER-ID LIST-OF-DEVICES

Queries the admin API. Uses CONNECTION and deletes the devices listed in LIST-OF-DEVICES that are associated with USER-ID.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-delete-local-media CONNECTION MEDIA-ID &optional SERVER
Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-delete-local-media-before-time CONNECTION SERVER &key SIZE BEFORE-TS UNIT

Given CONNECTION and a SERVER string like ’matrix.org’ attempts to purge all media content ie content referenced to with MXC’s from before the timestamp generated by taking BEFORE-TS x UNIT from the time of execution. SIZE is in bytes and all files above that size that have not been interacted with will be deleted.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-delete-request CONNECTION URL
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: admin-delete-room CONNECTION ROOM-ID
Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-force-user-to-join-room CONNECTION USER-ID ROOM-ID
Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-get-request CONNECTION URL
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: admin-list-all-of-a-user-devices CONNECTION USER-ID

Queries the admin API. Uses CONNECTION and lists all the devices associated with USER-ID.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-list-user-accounts CONNECTION &optional FROM LIMIT GUESTS

Queries the admin API. Uses CONNECTION to list user accounts.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-make-user-id-room-admin CONNECTION USER-ID ROOM-ID

Queries the admin API. Uses CONNECTION and makes USER-ID and administrator in that room.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-post-request CONNECTION URL &optional PLIST
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: admin-put-request CONNECTION URL PLIST
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: admin-query-current-sessions-for-user CONNECTION USER-ID

Queries the admin API. Uses CONNECTION and returns information about USER-ID’s sessions.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-query-user-account CONNECTION USER-ID

Queries the admin API. Uses CONNECTION to return information about USER-ID

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-reset-password CONNECTION USER-ID &optional NEW-PASS LOGOUT-DEVICES

Queries the admin API. Uses CONNECTION and resets USER-ID’s password to NEW-PASS.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-server-administrator CONNECTION USER-ID

Queries the admin API. Uses CONNECTION and returns whether USER-ID is an administrator.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-shadow-ban-user-id CONNECTION USER-ID
Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-show-a-users-device CONNECTION USER-ID DEVICE-ID

Queries the admin API. Uses CONNECTION and lists all the devices associated with USER-ID.

Package

lunamech-matrix-api

Source

admin-api.lisp (file)

Function: admin-whois CONNECTION USER-ID

Performs a whois call on USER-ID, only an admin can call this on non self users.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: ban-user-from-room CONNECTION ROOM-ID USER-ID &optional REASON-WHY

Bans the user denoted by USER-ID from ROOM-ID with the REASON-WHY.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: ban-user-from-room CONNECTION ROOM-ID USER-ID &optional REASON-WHY

Bans the user denoted by USER-ID from ROOM-ID with the REASON-WHY.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: create-private-room CONNECTION INVITE
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: create-private-room CONNECTION INVITE &rest KEYS &key &allow-other-keys
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: create-room CONNECTION NAME ROOM-ALIAS TOPIC &key PRIVATE INVITE
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: create-room CONNECTION NAME ROOM-ALIAS TOPIC &rest KEYS &key &allow-other-keys
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: destructure-mxc MXC

mxc://<server-name>/<media-id> -> server-name media-id

Package

lunamech-matrix-api/v2

Source

helpers.lisp (file)

Function: downcase-symbols LIST
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: download-content CONNECTION MXC-ADDRESS
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: download-content CONNECTION MXC-ADDRESS &key ALLOW-REMOTE
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: dry-sync CONNECTION &rest KEYS &key &allow-other-keys
Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: events-in-room CONNECTION ROOM-ID FROM &optional TIMEOUT
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: extract-events-of-type EVENTS TYPES

Gives a list of EVENTS extracts the events that match list of TYPES

Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: extract-events-of-type EVENTS TYPES

Gives a list of EVENTS extracts the events that match list of TYPES

Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: filter-to-remove-receipts-reaction-typing CONNECTION USER-ID
Package

lunamech-matrix-api/v2

Source

filters.lisp (file)

Function: gen-headers CONNECTION &optional CONTENT-TYPE

Generates a header list for use with dex

Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: gen-url CONNECTION &optional PREFIX

Generates a base uri for CONNECTION. if MEDIA is non nil then uses /_matrix/media/r0/ in place of (api CONNECTION). Returns a list whose first element is the url.

Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: generate-user-room-filter CONNECTION USER-ID &rest KEYS &key &allow-other-keys
Package

lunamech-matrix-api/v2

Source

filters.lisp (file)

Function: get-account-data CONNECTION USER-ID EVENT-TYPE
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: get-filter INSTANCE KEY
Package

lunamech-matrix-api/v2

Source

filters.lisp (file)

Function: get-request CONNECTION URL &optional GET-PARAMS
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: get-room-state CONNECTION ROOM-ID &rest REST &key &allow-other-keys

Grabs the room-state for ROOM-ID using CONNECTION. Uses ’events%get-state-events-in-room.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: get-string->condition STRING
Package

lunamech-matrix-api

Source

conditions.lisp (file)

Function: get-user-presence CONNECTION USER-ID
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: get-user-presence CONNECTION USER-ID
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: integration%register DIMENSION-CONNECTION OPENID-PLIST
Package

lunamech-matrix-api/v2

Source

integration.lisp (file)

Function: integration%user-information DIMENSION-CONNECTION
Package

lunamech-matrix-api/v2

Source

integration.lisp (file)

Function: integration%validate-user-id DIMENSION-CONNECTION OPEN-ID-PLIST USER-ID
Package

lunamech-matrix-api/v2

Source

integration.lisp (file)

Function: invite-member-to-room CONNECTION USER-ID ROOM-ID
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: invite-member-to-room CONNECTION USER-ID ROOM-ID
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: invite-to-space CONNECTION USER-ID SPACE-ID
Package

lunamech-matrix-api

Source

spaces.lisp (file)

Function: invite-user-to-all-spaces-in-space CONNECTION USER-ID SPACE-ID
Package

lunamech-matrix-api

Source

spaces.lisp (file)

Function: invite-user-to-all-spaces-in-space CONNECTION USER-ID SPACE-ID
Package

lunamech-matrix-api/v2

Source

spaces.lisp (file)

Function: join-room CONNECTION ID

Makes CONNECTION joined the room denoted by ID. Assuming it can.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: join-room CONNECTION ROOM-ID

Makes CONNECTION joined the room denoted by ROOM-ID. Assuming it can. Uses ’rooms%join-a-room.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: joined-rooms CONNECTION

Returns the rooms that CONNECTION is within.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: joined-rooms CONNECTION

Returns the rooms that CONNECTION is within. Uses ’rooms%my-joined-rooms

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: kick-user-from-room CONNECTION ROOM-ID USER-ID &optional REASON-WHY

Kicks the user denoted by USER-ID from ROOM-ID with the REASON-WHY.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: kick-user-from-room CONNECTION ROOM-ID USER-ID &optional REASON-WHY

Kicks the user denoted by USER-ID from ROOM-ID with the REASON-WHY.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: leave-room CONNECTION ID

Makes CONNECTION leave the room denoted by ID.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: leave-room CONNECTION ROOM-ID

Makes CONNECTION leave the room denoted by ROOM-ID. Uses ’rooms%leave-a-room.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: logout CONNECTION

Logs out CONNECTION.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: logout CONNECTION

Logs the CONNECTION out.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: make-auth CONNECTION

Creates a plist which represents an auth token that can be sent to the server using data within CONNECTION.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: make-connection USERNAME PASSWORD URL API
Package

lunamech-matrix-api

Source

classes.lisp (file)

Function: make-connection USERNAME PASSWORD URL API
Package

lunamech-matrix-api/v2

Source

classes.lisp (file)

Function: make-event CONTENT ETYPE EVENT-ID SENDER ORIGIN-SERVER-TS ROOM-ID &optional UNSIGNED
Package

lunamech-matrix-api

Source

events.lisp (file)

Function: members-in-room CONNECTION ROOM-ID

Gets the members of ROOM-ID.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: members-in-room CONNECTION ROOM-ID &rest KEYS &key &allow-other-keys

Gets the members of ROOM-ID.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: members-in-room%ids CONNECTION ROOM-ID
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: members-in-room-ids CONNECTION ROOM-ID

Gets the members id’s of ROOM-ID.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: members-in-room-ids CONNECTION ROOM-ID

Gets the members id’s of ROOM-ID.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: membership-events SYNC ROOM-ID
Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: membership-events SYNC ROOM-ID
Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: messages-in-room CONNECTION ROOM-ID &rest KEYS &key FROM TO DIR LIMIT FILTER
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: messages-in-room CONNECTION ROOM-ID &rest KEYS &key &allow-other-keys
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: new-request-type KEY FUN
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: object%event-filter &key LIMIT NOT-SENDERS NOT-TYPES SENDERS TYPES
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%event/m-room-message/m-image &key BODY INFO URL FILE
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%event/m-room-message/m-text MESSAGE FORMATTED-BODY
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%event/m-room-message/m-text%basic MESSAGE
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%event/m-room-redaction REASON
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%file-info &key MIMETYPE SIZE THUMBNAIL-URL THUMBNAIL-FILE THUMBNAIL-INFO
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%identifier-type/m-id-phonenumber COUNTRY PHONE
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%identifier-type/m-id-thirdparty MEDIUM ADDRESS
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%identifier-type/m-id-user USER
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%image-info &key H W MIMETYPE SIZE THUMBNAIL-URL THUMBNAIL-FILE THUMBNAIL-INFO
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%m-room-name NAME
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%room-event-filter &rest KEYS &key &allow-other-keys

See object%state-filter for options.

Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%room-filter &key NOT-ROOMS ROOMS EPHEMERAL INCLUDE-LEAVE STATE TIMELINE ACCOUNT-DATA
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%server-acl &key ALLOW ALLOW-IP-LITERALS DENY
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%state-filter &key LIMIT NOT-SENDERS NOT-TYPES SENDERS TYPES LAZY-LOAD-MEMBERS INCLUDE-REDUNDANT-MEMBERS NOT-ROOMS ROOMS CONTAINS-URL
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: object%thumbnail-info &key H W MIMETYPE SIZE
Package

lunamech-matrix-api/v2

Source

object-helpers.lisp (file)

Function: password-login CONNECTION
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: password-login CONNECTION

Given a well formed CONNECTION instance attempts to use ’login-connection to log the CONNECTION into their api.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: public-rooms CONNECTION

Returns all the public rooms accessible by CONNECTION.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: public-rooms CONNECTION &rest REST &key &allow-other-keys

Lists the public rooms for CONNECTION. Uses ’rooms%public-rooms.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: put-request CONNECTION URL PLIST
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: put-request-object CONNECTION URL OBJECT
Package

lunamech-matrix-api

Source

api-helpers.lisp (file)

Function: redact-event-in-room CONNECTION ROOM-ID EVENT-ID REASON

Redacts EVENT-ID from ROOM-ID using CONNECTION. Provide a reason with REASON. Uses ’events%redact-event.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: request-open-id-token CONNECTION
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: request-open-id-token CONNECTION
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: restore-connection LIST &optional SLOTS
Package

lunamech-matrix-api

Source

classes.lisp (file)

Function: restore-connection LIST &optional SLOTS
Package

lunamech-matrix-api/v2

Source

serialize.lisp (file)

Function: room-invite SYNC
Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: room-invite SYNC
Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: room-joins MEMBERSHIP-EVENTS

Extracts all events containing a :|membership| ’join’ event

Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: room-joins MEMBERSHIP-EVENTS

Extracts all events containing a :|membership| ’join’ event

Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: room-leaves MEMBERSHIP-EVENTS

Extracts all events containing a :|membership| ’leave’ event

Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: room-leaves MEMBERSHIP-EVENTS

Extracts all events containing a :|membership| ’leave’ event

Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: room-messages SYNC ROOM-ID
Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: room-messages SYNC ROOM-ID
Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: room-timeline SYNC ROOM-ID
Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: room-timeline SYNC ROOM-ID
Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: rooms-in-a-space CONNECTION ROOM-ID
Package

lunamech-matrix-api

Source

spaces.lisp (file)

Function: rooms-in-a-space CONNECTION ROOM-ID
Package

lunamech-matrix-api/v2

Source

spaces.lisp (file)

Function: send-event-to-room CONNECTION ROOM-ID EVENT-TYPE MESSAGE-EVENT

Sends the event to the ROOM-ID, assuming CONNECTION is within it.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: send-event-to-room CONNECTION ROOM-ID EVENT-TYPE EVENT

Sends EVENT of EVENT-TYPE to ROOM-ID using CONNECTION. Uses ’events%put-message-event-into-room.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: send-file-bytes-to-room CONNECTION ROOM-ID NAME BYTES FILE-INFO-OBJECT
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: send-image-bytes-to-room CONNECTION ROOM-ID NAME CONTENT-TYPE BYTES
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: send-image-bytes-to-room CONNECTION ROOM-ID NAME CONTENT-TYPE BYTES &rest KEYS &key &allow-other-keys

Uploads BYTES from BYTES to to ROOM-ID. Keys are passed to object%event/m-room-message/m-image

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: send-image-file-to-room CONNECTION ROOM-ID NAME CONTENT-TYPE PATH
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: send-image-file-to-room CONNECTION ROOM-ID NAME CONTENT-TYPE PATH &rest KEYS &key &allow-other-keys

Uploads image from PATH to to ROOM-ID. Keys are passed to object%event/m-room-message/m-image

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: send-message-event-to-room CONNECTION ROOM-ID MESSAGE-EVENT

Sends the message MESSAGE-EVENT to the ROOM-ID, assuming CONNECTION is within it.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: send-message-event-to-room CONNECTION ROOM-ID MESSAGE-EVENT

Sends MESSAGE-EVENT to ROOM-ID using CONNECTION. Uses #’send-event-to-room.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: send-message-to-room CONNECTION ROOM-ID MESSAGE

Sends the message MESSAGE to the ROOM-ID, assuming CONNECTION is within it.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: send-message-to-room CONNECTION ROOM-ID MESSAGE

Sends a MESSAGE to ROOM-ID using CONNECTION.
Uses object%event/m-room.message/m-text%basic and #’send-event-to-room.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: send-state-event-to-room CONNECTION ROOM-ID EVENT-TYPE EVENT &optional STATE-KEY
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: send-state-event-to-room CONNECTION ROOM-ID EVENT-TYPE EVENT

Sends state EVENT of EVENT-TYPE to ROOM-ID using CONNECTION. Uses ’events%put-state-event-into-room.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: serialize-connection CONNECTION &optional SLOTS
Package

lunamech-matrix-api

Source

classes.lisp (file)

Function: serialize-connection CONNECTION &optional SLOTS
Package

lunamech-matrix-api/v2

Source

serialize.lisp (file)

Function: set-avatar-url CONNECTION USER-ID MXC
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: signal-condition-from-response RESPONSE
Package

lunamech-matrix-api

Source

conditions.lisp (file)

Function: spaces-hierarchy CONNECTION ROOM-ID
Package

lunamech-matrix-api

Source

spaces.lisp (file)

Function: spaces-hierarchy CONNECTION ROOM-ID &rest KEYS
Package

lunamech-matrix-api/v2

Source

spaces.lisp (file)

Function: spaces-in-a-space CONNECTION ROOM-ID
Package

lunamech-matrix-api

Source

spaces.lisp (file)

Function: spaces-in-a-space CONNECTION ROOM-ID
Package

lunamech-matrix-api/v2

Source

spaces.lisp (file)

Function: spaces-rooms CONNECTION ROOM-ID
Package

lunamech-matrix-api

Source

spaces.lisp (file)

Function: sync CONNECTION &optional FILTER-ID

Gets the latest sync object from the server using CONNECTION.

Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: sync CONNECTION &rest KEYS &key &allow-other-keys

Gets the latest sync object from the server using CONNECTION.

Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: traverse-sync SYNC LIST-OF-KEYS

The default sync that is received and then parsed from the server ends up as one big ol plist, so this function takes a variety of lowercase keywords ie :|imasym| and steps through the plist using those keys.

Package

lunamech-matrix-api

Source

sync.lisp (file)

Function: traverse-sync SYNC LIST-OF-KEYS

The default sync that is received and then parsed from the server ends up as one big ol plist, so this function takes a variety of lowercase keywords ie :|imasym| and steps through the plist using those keys.

Package

lunamech-matrix-api/v2

Source

sync.lisp (file)

Function: unban-user-from-room CONNECTION ROOM-ID USER-ID

Unbans the user denoted by USER-ID from ROOM-ID.

Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: unban-user-from-room CONNECTION ROOM-ID USER-ID

Unbans the user denoted by USER-ID from ROOM-ID.

Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: upload-content CONNECTION FILENAME CONTENT-TYPE CONTENT-BYTES
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: upload-content CONNECTION FILENAME CONTENT-TYPE CONTENT-BYTES
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: upload-new-filter FILTER-KEY FILTER-OBJECT

Uploads a new filter (FILTER-OBJECT)
using call-api and then stores the filter_id returned from the call under FILTER-KEY in (filters (connection FILTER-OBJECT)).

Package

lunamech-matrix-api/v2

Source

filters.lisp (file)

Function: url-e URL
Package

lunamech-matrix-api/v2

Source

api-protocol.lisp (file)

Function: user-display-name CONNECTION USER-ID
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: user-display-name CONNECTION USER-ID
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: user-online-p CONNECTION USER-ID
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: user-online-p CONNECTION USER-ID
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: user-profile-url CONNECTION USER-ID
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: user-profile-url CONNECTION USER-ID
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)

Function: valid-user-p CONNECTION USER-ID
Package

lunamech-matrix-api

Source

user-api.lisp (file)

Function: valid-user-p CONNECTION USER-ID
Package

lunamech-matrix-api/v2

Source

user-api.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Generic functions

Generic Function: %call-condition-handler CONDITION

Attempts to handle conditions that come about as a consequence of executing an api call.

Package

lunamech-matrix-api/v2

Source

call-wrapper.lisp (file)

Methods
Method: %call-condition-handler (CONDITION http-request-failed)
Method: %call-condition-handler (CONDITION ns-error)
Method: %call-condition-handler (CONDITION socket-condition)
Generic Function: %handle-dex-condition CONDITION STATUS

Attempts to correctly handle dex problems.

Package

lunamech-matrix-api/v2

Source

call-wrapper.lisp (file)

Methods
Method: %handle-dex-condition CONDITION STATUS
Method: %handle-dex-condition CONDITION (STATUS (eql 405))
Method: %handle-dex-condition CONDITION (STATUS (eql 404))
Generic Function: access-token OBJECT
Generic Function: (setf access-token) NEW-VALUE OBJECT
Package

lunamech-matrix-api/v2

Methods
Method: access-token (INTEGRATION%REGISTER integration%register)

automatically generated reader method

Source

integration.lisp (file)

Method: (setf access-token) NEW-VALUE (INTEGRATION%REGISTER integration%register)