ryjm / urbit-api.el

Urbit API for emacs in elisp.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Urbit HTTP elisp API

Connect your operating system with your personal server.

https://img.shields.io/badge/~-awesome%20urbit-lightgrey.svg

Install

Get aio and request then use M-x package-install-file to install a tarball, or just clone the repo into your load path.

Example

Urbit-http

All of the user facing functions use aio and return promises.

(require 'urbit)
(require 'urbit-http)
(require 'aio)

;; Connect to a ~zod running locally
(aio-wait-for
 (urbit-launch "http://localhost:8080" "lidlut-tabwed-pillex-ridrup"))

;; Send a poke
(urbit-http-poke "hood" "helm-hi" "Hello, world!"
            (lambda () (message "Poke succeeded."))
            (lambda () (message "Poke failed.")))

;; Subscribe to an app
(urbit-http-subscribe "graph-store" "/updates"
                 (lambda (event) (message "Graph update recieved %s" event)))

About

Urbit API for emacs in elisp.

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%