emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/webpaste 8d5e884 200/298: Added skeleton of documentation


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste 8d5e884 200/298: Added skeleton of documentation for creation of custom providers.
Date: Thu, 9 Dec 2021 19:00:14 -0500 (EST)

branch: elpa/webpaste
commit 8d5e884eca71df97735e7eab0270a01b746b2a6d
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>

    Added skeleton of documentation for creation of custom providers.
    
    This fixes #21.
---
 README.org | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/README.org b/README.org
index 45f160e..56dfe7d 100644
--- a/README.org
+++ b/README.org
@@ -117,6 +117,26 @@ can have several hooks as well if you want it to do 
several custom things.
             (lambda (url) (browse-url-generic url)))
 #+end_src
 
+*** Custom providers
+The example of one of the simplest providers possible to write:
+#+begin_src emacs-lisp
+  (require 'webpaste)
+  (add-to-list
+   'webpaste-providers-alist
+   '("example.com"
+     :uri "https://example.com/";
+     :post-field "content"
+     :success-lambda webpaste-providers-success-location-header))
+#+end_src
+
+Options available are the options used in webpaste--provider. These docs are
+available within emacs documentation. To read this you need to require
+webpaste first and then just read the documentation by running this:
+#+begin_src emacs-lisp
+  (require 'webpaste)
+  (describe-function 'webpaste--provider)
+#+end_src
+
 ** TODO Providers to implement [7/10]
  - [X] ptpb.pw
  - [X] ix.io



reply via email to

[Prev in Thread] Current Thread [Next in Thread]