[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste 8905a52 125/298: Re-arrange arguments to webpaste
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste 8905a52 125/298: Re-arrange arguments to webpaste-provider and update docs |
Date: |
Thu, 9 Dec 2021 18:59:58 -0500 (EST) |
branch: elpa/webpaste
commit 8905a5264dad46156071f5be992761ca17d33d76
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Re-arrange arguments to webpaste-provider and update docs
---
webpaste.el | 50 ++++++++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/webpaste.el b/webpaste.el
index 3d5239b..70320f5 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -102,38 +102,48 @@ each run.")
(cl-defun webpaste-provider (&key uri
+ post-field
+ success-lambda
(type "POST")
- (parser 'buffer-string)
(post-data '())
- (sync nil)
- post-field
- (post-field-lambda
webpaste/providers-default-post-field-lambda)
+ (parser 'buffer-string)
(error-lambda
webpaste/providers-error-lambda)
- success-lambda)
+ (post-field-lambda
webpaste/providers-default-post-field-lambda)
+ (sync nil))
"Function to create the lambda function for a provider.
Usage:
(webpaste-provider
[:keyword [option]]...)
-:uri URI that we should do the request to to paste data.
-:type HTTP Request type, defaults to POST.
-:parser Defines how request.el parses the result. Look up :parser for
- `request'. This defaults to 'buffer-string.
-:post-data Default post fields sent to service. Defaults to nil.
-:post-field Name of the field to insert the code into.
-:sync Set to t to wait until request is done. Defaults to nil. This
- should only be used for debugging purposes.
+Required params:
+:uri URI that we should do the request to to paste data.
+
+:post-field Name of the field to insert the code into.
+
+:success-lambda Callback sent to `request', look up how to write these in
the
+ documentation for `request'.
+
+Optional params:
+:type HTTP Request type, defaults to POST.
+
+:post-data Default post fields sent to service. Defaults to nil.
+
+:parser Defines how request.el parses the result. Look up :parser
for
+ `request'. This defaults to 'buffer-string.
+
+:error-lambda Callback sent to `request', look up how to write these in
the
+ documentation for `request'. The default value for this is
+ `webpaste/providers-error-lambda', but there's also
+ `webpaste/providers-error-lambda-no-failover' available if
+ you need a provider that isn't allowed to failover.
+
:post-field-lambda Function that builds and returns the post data that should
be
sent to the provider. It should accept the parameter TEXT
only which contains the content that should be sent.
-:success-lambda Callback sent to `request', look up how to write these in the
- documentation for `request'.
-:error-lambda Callback sent to `request', look up how to write these in the
- documentation for `request'. The default value for this is
- `webpaste/providers-error-lambda', but there's also
- `webpaste/providers-error-lambda-no-failover' available if you
- need a provider that isn't allowed to failover."
+
+:sync Set to t to wait until request is done. Defaults to nil.
+ This should only be used for debugging purposes."
(lambda (text)
"Paste TEXT to provider"
- [nongnu] elpa/webpaste 346b5bc 087/298: Rename tests to be prefixed, (continued)
- [nongnu] elpa/webpaste 346b5bc 087/298: Rename tests to be prefixed, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 3389b4a 089/298: Do not provide test-helper feature, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7db5673 093/298: Added more emacs versions for tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 382e01d 105/298: Added page breaks to files, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b7acc4e 100/298: Added test for returning of URL's, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 8027e6e 106/298: Run tests on emacs 25.2 since it's been released, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e04d885 114/298: Add (prog1 nil ...) form to avoid having the nil hanging at the end, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 124ef8b 119/298: Drop usage of concat when returning link to users message field, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 69166a3 121/298: Moved error-handling of failed requests out so providers must specify it, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 69f9452 122/298: Bump version for minor release, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 8905a52 125/298: Re-arrange arguments to webpaste-provider and update docs,
ELPA Syncer <=
- [nongnu] elpa/webpaste 72ba31e 127/298: Bump version for new release, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7d03ed3 137/298: Removed unused variables defined in function declaration, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 07a85e9 142/298: Added pre-calculated alist of languages for providers, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7b84568 155/298: Avoid setq's in favor of let, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0c0e88a 079/298: Added basic structure of tests file, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 95289e5 082/298: Added .travis.yml config file, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7c90bc5 090/298: Merge branch 'tarsius-master', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ec85d7d 092/298: Added unit test for static provider configuration, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2c5eb3c 149/298: Fix broken build., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste f161620 163/298: Refactored the success callbacks, ELPA Syncer, 2021/12/09