[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/plz 9c2d86aa31 1/3: Meta: 0.2.1-pre
From: |
ELPA Syncer |
Subject: |
[elpa] externals/plz 9c2d86aa31 1/3: Meta: 0.2.1-pre |
Date: |
Mon, 26 Sep 2022 13:58:05 -0400 (EDT) |
branch: externals/plz
commit 9c2d86aa312a28b30579b49809a78b17db87a21d
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Meta: 0.2.1-pre
---
README.org | 4 +++
plz.el | 2 +-
plz.info | 100 +++++++++++++++++++++++++++++++++++++++++++++++++------------
3 files changed, 86 insertions(+), 20 deletions(-)
diff --git a/README.org b/README.org
index d4a1d7c7a6..fc7c76d76f 100644
--- a/README.org
+++ b/README.org
@@ -173,6 +173,10 @@ You may also clear a queue with ~plz-clear~, which cancels
any active or queued
:TOC: :depth 0
:END:
+** 0.2.1-pre
+
+Nothing new yet.
+
** 0.2
*Added*
diff --git a/plz.el b/plz.el
index 2205ae88d5..8f0cbe2504 100644
--- a/plz.el
+++ b/plz.el
@@ -5,7 +5,7 @@
;; Author: Adam Porter <adam@alphapapa.net>
;; Maintainer: Adam Porter <adam@alphapapa.net>
;; URL: https://github.com/alphapapa/plz.el
-;; Version: 0.2
+;; Version: 0.2.1-pre
;; Package-Requires: ((emacs "26.3"))
;; Keywords: comm, network, http
diff --git a/plz.info b/plz.info
index 6db4577566..ae3bc49e1b 100644
--- a/plz.info
+++ b/plz.info
@@ -41,10 +41,13 @@ Usage
* Examples::
* Functions::
+* Queueing::
* Tips::
Changelog
+* 0.2.1-pre: 021-pre.
+* 0.2: 02.
* 0.1: 01.
Development
@@ -88,7 +91,7 @@ File: README.info, Node: Usage, Next: Changelog, Prev:
Installation, Up: Top
2 Usage
*******
-The only public function is ‘plz’, which sends an HTTP request and
+The main public function is ‘plz’, which sends an HTTP request and
returns either the result of the specified type (for a synchronous
request), or the ‘curl’ process object (for asynchronous requests). For
asynchronous requests, callback, error-handling, and finalizer functions
@@ -98,6 +101,7 @@ may be specified, as well as various other options.
* Examples::
* Functions::
+* Queueing::
* Tips::
@@ -147,7 +151,7 @@ from the data:
(image :type jpeg :data ""ÿØÿà^@^PJFIF...")
-File: README.info, Node: Functions, Next: Tips, Prev: Examples, Up: Usage
+File: README.info, Node: Functions, Next: Queueing, Prev: Examples, Up:
Usage
2.2 Functions
=============
@@ -210,9 +214,45 @@ File: README.info, Node: Functions, Next: Tips, Prev:
Examples, Up: Usage
‘NOQUERY’ is passed to ‘make-process’, which see.
-File: README.info, Node: Tips, Prev: Functions, Up: Usage
+File: README.info, Node: Queueing, Next: Tips, Prev: Functions, Up: Usage
-2.3 Tips
+2.3 Queueing
+============
+
+‘plz’ provides a simple system for queueing HTTP requests. First, make
+a ‘plz-queue’ struct by calling ‘make-plz-queue’. Then call ‘plz-queue’
+with the struct as the first argument, and the rest of the arguments
+being the same as those passed to ‘plz’. Then call ‘plz-run’ to run the
+queued requests.
+
+ All of the queue-related functions return the queue as their value,
+making them easy to use. For example:
+
+ (defvar my-queue (make-plz-queue :limit 2))
+
+ (plz-run
+ (plz-queue my-queue
+ 'get "https://httpbin.org/get?foo=0"
+ :then (lambda (body) (message "%s" body))))
+
+ Or:
+
+ (let ((queue (make-plz-queue :limit 2))
+ (urls '("https://httpbin.org/get?foo=0"
+ "https://httpbin.org/get?foo=1")))
+ (plz-run
+ (dolist (url urls queue)
+ (plz-queue queue 'get url
+ :then (lambda (body) (message "%s" body))))))
+
+ You may also clear a queue with ‘plz-clear’, which cancels any active
+or queued requests and calls their ‘:else’ functions. And ‘plz-length’
+returns the number of a queue’s active and queued requests.
+
+
+File: README.info, Node: Tips, Prev: Queueing, Up: Usage
+
+2.4 Tips
========
• You can customize settings in the ‘plz’ group, but this can only be
@@ -227,12 +267,31 @@ File: README.info, Node: Changelog, Next: Credits,
Prev: Usage, Up: Top
* Menu:
+* 0.2.1-pre: 021-pre.
+* 0.2: 02.
* 0.1: 01.
-File: README.info, Node: 01, Up: Changelog
+File: README.info, Node: 021-pre, Next: 02, Up: Changelog
+
+3.1 0.2.1-pre
+=============
+
+Nothing new yet.
+
+
+File: README.info, Node: 02, Next: 01, Prev: 021-pre, Up: Changelog
+
+3.2 0.2
+=======
+
+*Added*
+ • Simple request queueing.
+
+
+File: README.info, Node: 01, Prev: 02, Up: Changelog
-3.1 0.1
+3.3 0.1
=======
Initial release.
@@ -292,19 +351,22 @@ GPLv3
Tag Table:
Node: Top199
-Node: Installation1032
-Node: GNU ELPA1175
-Node: Manual1421
-Node: Usage1727
-Node: Examples2215
-Node: Functions3582
-Node: Tips6473
-Node: Changelog6775
-Node: 016901
-Node: Credits6984
-Node: Development7350
-Node: Copyright assignment7864
-Node: License8452
+Node: Installation1080
+Node: GNU ELPA1223
+Node: Manual1469
+Node: Usage1775
+Node: Examples2276
+Node: Functions3643
+Node: Queueing6538
+Node: Tips7796
+Node: Changelog8097
+Node: 021-pre8258
+Node: 028369
+Node: 018502
+Node: Credits8596
+Node: Development8962
+Node: Copyright assignment9476
+Node: License10064
End Tag Table