1
0
Fork 0

- [RPC] removed parsed lines from object returned by the function 'gemini-stream-info', there are more specialized functions to get those;

- [RPC] added 'gemini-all-stream-info'.
This commit is contained in:
cage 2023-01-06 12:47:20 +01:00
parent c01188e0db
commit 39ad2ffad8
2 changed files with 7 additions and 5 deletions

View File

@ -247,11 +247,7 @@
(json:with-object ()
(loop for ((k . v)) on info-alist do
(json:with-object-element (k)
(json:encode v)))
(json:with-object-element ("lines")
(json:with-array ()
(loop for parsed-line in actual-parsed-lines do
(json:encode-array-element parsed-line))))))))))
(json:encode v)))))))))
(defun gemini-stream-parsed-line (iri line-number)
(let ((stream-wrapper (gw:find-db-stream-url iri)))
@ -318,6 +314,9 @@
stream-wrapper
(error "no such stream"))))
(defun gemini-all-stream-info ()
gw:*gemini-streams-db*)
(defmacro prepare-rpc (&body body)
`(let ((rpc:*function-db* '()))
(gen-rpc "add"
@ -343,4 +342,6 @@
"iri" 0
"line-number-start" 1
"line-number-end" 2)
(gen-rpc "gemini-all-stream-info"
'gemini-all-stream-info)
,@body))

View File

@ -2621,6 +2621,7 @@
(:shadowing-import-from :misc :random-elt :shuffle)
(:local-nicknames (:c :croatoan))
(:export
:*gemini-streams-db*
:push-db-stream
:remove-db-stream
:remove-all-db-stream