summaryrefslogtreecommitdiff
path: root/package.lisp
blob: 89756cc5e0387ef1fb98e29fe68ba9c6f8e45614 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
;;;; package.lisp

(defpackage #:granolin
  (:use #:cl)
  (:export

   ;; macros
   #:let-cond
   #:let-if
   #:let-when
   #:getob
   #:def-json-wrap

   ;; utilities
   #:string->json-key
   #:readable-username

   ;; main class
   #:client
   #:homeserver
   #:logged-in-p
   #:hardcopy
   #:timeout
   #:save-client-state
   #:load-client-state

   ;; bot generic functions
   #:handle-event
   #:clean-up
   #:hardcopy-plist

   ;; utility classes & their APIS
   #:message-log ; plugin 
   #:server-directory ; plugin
   #:server-room      ; data class
   #:room-members
   #:direct-p
   #:get-room
   #:get-direct-room
   #:find-rooms-named
   #:client-contacts
   #:room-member-p
   #:find-contact
   #:ensure-direct-room
   #:create-direct-message-room

   #:auto-joiner

   ;; json data utilities & accessors
   #:event-content
   #:event-id
   #:event-type
   #:msg-body
   #:msg-type
   #:prev-content
   #:room-aliases
   #:room-name
   #:sender
   #:state-key

   ;; event types
   #:timeline-event
   #:text-message-event
   #:image-message-event
   #:audio-message-event
   #:file-message-event
   #:video-message-event
   #:emote-message-event
   #:notice-message-event
   #:location-message-event
   #:room-state-event
   #:invitation-event

   ;; event utils
   #:im-the-sender-p

   ;; generic response types
   #:basic-json

   ;; server interaction macros
   #:send
   #:fetch

   ;; matrix API calls
   #:login
   #:sync
   #:send-text-message
   #:send-image-message
   #:send-video-message
   #:send-audio-message
   #:send-file-message
   #:send-media-message
   #:join-room
   #:create-direct-message-room
   #:upload

   ;; bot control
   #:start
   #:stop

   ;; special variables
   #:*room-id*
   ))