branch: elpa/fedi
commit 9dc5ad52095f22035f8bffc366500c272b3413e2
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
readme
---
readme.org | 40 ++++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/readme.org b/readme.org
index 177bb5673b4..733378b5543 100644
--- a/readme.org
+++ b/readme.org
@@ -2,16 +2,16 @@
A library to make writing clients for APIs easier.
-It uses code from my
[[https://codeberg.org/martianh/mastodon.el][mastodon.el]] to make it easy to
write endpoint-hitting
-functions for JSON APIs, and to easily build interfaces.
+It uses code ported from
[[https://codeberg.org/martianh/mastodon.el][mastodon.el]] to make it easy to
write requests for
+JSON APIs and build client interfaces.
* http layer
-The example macro =fedi-request= allows you to quickly create HTTP request
-commands to API endpoints, with parameters automatically constructed and sent
-as form data or JSON payloads (for POST, PUT, DELETE, and probably PATCH). You
-should write your own similar macro in your package. See my =lem.el= for a
-working example. That way you can handle package-specific parameters such as
+The example macro =fedi-request= allows you to quickly create HTTP requests to
+API endpoints, with parameters automatically constructed and sent as form data
+or JSON payloads (for POST, PUT, DELETE, and probably PATCH). You should write
+your own similar macro in your package. For a working example, see the
+[[https://codeberg.org/martianh/lem.el/src/commit/25def6d187caa2bfac238469de81dbaecef757ec/lisp/lem-request.el#L36][lem-request]]
macro. That way you can handle package-specific parameters such as
authentication.
Responses are checked with =fedi-http--triage=, and processed with
@@ -22,31 +22,35 @@ Because of how =mastodon.el= works, there is also code for
handling link headers
in responses. Mastodon uses these for pagination in some cases. If your
service also does, you can handle them too.
-For an example of using this library, see my
[[https://codeberg.org/martianh/lem.el][lem.el]] repo.
-
* utilities
=fedi.el= contains functions for:
-- setting up a new client buffer
+- setting up a new view buffer
- navigating between items
- displaying icons
- completing-read action functions
- handling action responses
- updating item display after action
+- rendering propertized links for special items (user handles, hashtags, etc.)
- formatting headings
- webfinger lookup of URLs
-- and live-updating timestamps.
+- and live-updating, human-readable timestamps.
* posting
-=fedi-post.el= contains functions for rich composing of posts. It supports
-pretty display of available bindings, toggling post flags like NSFW, and
-completion of items like handles and tags.
+=fedi-post.el= contains functions for rich composing of posts. It supports:
+
+- pretty display of available bindings
+- toggling post flags like NSFW
+- completion of items like handles and tags.
+
+* clients using =fedi.el=
+
+- [[https://codeberg.org/martianh/lem.el][lem.el]] (Lemmy client)
+- [[https://codeberg.org/martianh/fj.el][fj.el]] (Forgejo client)
* contributing
-If you're making an Emacs to a fediverse (or similar) service and interested
-in using this library, don't hesitate to get in touch. The library was
-originally created to abstract code out of =mastodon.el= for use in =lem.el=,
but
-could happily be further adapted to accommodate other projects.
+If you're making an Emacs client for a fediverse (or similar API) service and
interested
+in using this library, don't hesitate to get in touch. It's easy to adapt for
the sake of other needs.