mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
api docs
This commit is contained in:
parent
04db74191e
commit
e164f69b01
@ -9,7 +9,7 @@
|
||||
|
||||
<h2>Return values</h2>
|
||||
<p class="explain">
|
||||
On success, the API returns the paste URL in JSON format: <code>{"url":"<?php echo site_url('view/68582786'); ?>"}</code><br />
|
||||
On success, the API returns the paste URL in JSON format: <code>{"url":"<?php echo site_url('view/[pasteid]'); ?>"}</code><br />
|
||||
On error, the API returns the error message in JSON format: <code>{"error":"missing paste text"}</code>
|
||||
</p>
|
||||
|
||||
@ -31,6 +31,12 @@
|
||||
Possible values: <?php echo $languages; ?>
|
||||
</p>
|
||||
|
||||
<code>expire=[minutes]</code>
|
||||
<p class="explain">Set paste expiration.</p>
|
||||
|
||||
<code>reply=[pasteid]</code>
|
||||
<p class="explain">Reply to existing paste.</p>
|
||||
|
||||
<h2>Examples</h2>
|
||||
<p> </p>
|
||||
|
||||
@ -46,6 +52,10 @@
|
||||
<code>curl -d lang=php --data-urlencode text@main.php <?php echo site_url('api/create'); ?></code>
|
||||
<p class="explain">Create a paste with PHP syntax highlighting.</p>
|
||||
|
||||
<h3>Get paste ;-)</h3>
|
||||
<code>curl <?php echo site_url('view/raw/[pasteid]'); ?></code>
|
||||
<p class="explain">Display paste.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $this->load->view("defaults/footer");?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user