This commit is contained in:
Claude 2012-04-19 11:41:01 +02:00
parent 04db74191e
commit e164f69b01

View File

@ -9,7 +9,7 @@
<h2>Return values</h2> <h2>Return values</h2>
<p class="explain"> <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> On error, the API returns the error message in JSON format: <code>{"error":"missing paste text"}</code>
</p> </p>
@ -31,6 +31,12 @@
Possible values: <?php echo $languages; ?> Possible values: <?php echo $languages; ?>
</p> </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> <h2>Examples</h2>
<p>&nbsp;</p> <p>&nbsp;</p>
@ -46,6 +52,10 @@
<code>curl -d lang=php --data-urlencode text@main.php <?php echo site_url('api/create'); ?></code> <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> <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> </div>
<?php $this->load->view("defaults/footer");?> <?php $this->load->view("defaults/footer");?>