diff --git a/htdocs/application/views/api_help.php b/htdocs/application/views/api_help.php index 1198d56..78fe038 100755 --- a/htdocs/application/views/api_help.php +++ b/htdocs/application/views/api_help.php @@ -1,8 +1,40 @@ load->view("defaults/header");?> -
Create pastes from the commandline
+ +text=[your paste text]
+ The paste content. Required.
+ +name=[name]
+ The author's name.
+ +private=1
+ Make paste private.
+ +
+ On success, the API returns the paste URL in JSON format: {"url":""}
+ On error, the API returns the error message in JSON format: {"error":"missing paste text"}
+
+ +
curl -d text='this is my text'
+ Create a paste with the text 'this is my text'.
+ +curl -d private=1 -d name=Herbert --data-urlencode text@/etc/passwd
+ Create a private paste with the author 'Herbert' and the contents of '/etc/passwd'.
+