diff --git a/htdocs/application/controllers/api.php b/htdocs/application/controllers/api.php index 19adbd8..3ecee9a 100755 --- a/htdocs/application/controllers/api.php +++ b/htdocs/application/controllers/api.php @@ -20,7 +20,11 @@ class Api extends Main function index() { - $this->load->view('api_help'); + $languages = $this->languages->get_languages(); + $languages = array_keys($languages); + $languages = implode(', ', $languages); + $data['languages'] = $languages; + $this->load->view('api_help', $data); } function create() diff --git a/htdocs/application/views/api_help.php b/htdocs/application/views/api_help.php index 78fe038..9cd5274 100755 --- a/htdocs/application/views/api_help.php +++ b/htdocs/application/views/api_help.php @@ -7,7 +7,14 @@
+ 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"}
+
text=[your paste text]
The paste content. Required.
@@ -18,10 +25,10 @@private=1
Make paste private.
-lang=[language]
- 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"}
+ Use alternative syntax highlighting.
+ Possible values:
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'.
+curl -d lang=php --data-urlencode text@main.php
+ Create a paste with PHP syntax highlighting.
+ load->view("defaults/footer");?>