@ -109,18 +107,20 @@ while PARAMS contain the rest of the parameters."
@@ -109,18 +107,20 @@ while PARAMS contain the rest of the parameters."
(json-rpc-closetwisterd)
result))
(defuntw-get-last-post(user)
(defuntwister-get-last-post(user)
"Get the last post of a user"
(let(obj(json-new-object))
(twister-rpc"getposts"1
(vector(json-add-to-objectobj"username"user)))))
(defuntw-get-next-k(user)
"Get the next 'k' for a user; this is a post sequence"
;; Data structure visible here: http://twister.net.co/?page_id=21
(defuntwister-get-next-k(user)
"Get the next 'k' for a user; this is a post sequence number.
Thedatastructurethatcontainsisisdocumentedat:
http://twister.net.co/?page_id=21"
(+1(plist-get
(plist-get
(elt(tw-get-last-postuser)0)
(elt(twister-get-last-postuser)0)
:userpost):k)))
(defuntwister-post(msg)
@ -129,7 +129,7 @@ while PARAMS contain the rest of the parameters."
@@ -129,7 +129,7 @@ while PARAMS contain the rest of the parameters."
(twister-rpc"newpostmsg"
twister-user
(tw-get-next-ktwister-user)msg))
(twister-get-next-ktwister-user)msg))
(defuntwister-post-region(beginend)
"Post the current region to twister.
@ -162,7 +162,9 @@ The BEGIN and END arguments are the usual points of the region."
@@ -162,7 +162,9 @@ The BEGIN and END arguments are the usual points of the region."
(fit-window-to-buffer(selected-window)1010)))
(defuntwister-close-post()
"Hide and kill the posting buffer if it is the special posting buffer."
"Hide and kill the posting buffer if it is the special posting buffer.
@ -171,5 +173,14 @@ The BEGIN and END arguments are the usual points of the region."
@@ -171,5 +173,14 @@ The BEGIN and END arguments are the usual points of the region."
(kill-buffertwister-post-buffername)
)))
(defuntwister-getfollowing(&optionaluser)
"Get a vector of usernames which are followed by `twister-user'.