get paid to paste


API Documentation
Any of the following API Methods can be hit with POST and GET. The return formats are either XML or JSON, as specified by the hit.

api/create - creating a paste
api/get - retrieving a paste
api/list - list pastes made by an user
api/delete - deleting a paste
api/edit - editting a paste

Download PHP API Library

Editting a paste...

URL
http://tny.cz/api/create.(xml|json)

ON SUCCESS
<?xml version="1.0" encoding="utf-8"?>
<result>
   <response>success</response>
</result>

ON FAIL
<?xml version="1.0" encoding="utf-8"?>
<result>
   <error>error_code_here</error>
</result>

ERROR CODES
no_id - no paste #id was supplied
paste_deleted - paste was deleted
paste_no_exist - paste does not exist
password_invalid - password for paste was incorrect.
auth_invalid - invalid authentification.
cannot_edit - paste cannot be editted because it has no author.
author_only - only the author of a paste can delete it.
paste_empty - paste supplied is empty
is_code_error - is_code integer supplied is not 0 or 1
is_private_error - is_private integer supplied is not 0 or 1
expires_invalid - expires date is in the past, use GMT
auth_invalid - invalid authentification
parent_not_exist - parent paste id supplied does not exist

Required Parameters
id (string)
The paste #id to retrieve
authenticate (string) - conjoin username and password with a colon.
Only the author may edit a paste.
Format: sampleuser:password.
Password should be in MD5 format
Optional Parameters
password (string)
Required if the paste is password-protected.
paste (string)
The text or code for the paste
title (string) - Letters and Numbers only. Will be shortened if longer than 40 characters.
a title for the paste
is_code (integer: 0 or 1)
1=paste will be parsed as code with highlighting and enabled compiler.
0=paste will be parsed as plain text. (recommended for non-code pastes)
is_private (integer: 0 or 1)
1=paste will be hidden from Recent Pastes list.
0=paste will be shown on Recent Pastes List.
newpassword (string)
If set, the password required for the paste will be changed.
expires (integer) - Unix Timestamp in GMT
If set, the paste will be deleted at specified time.
parent (string) - must be valid paste #id
Sets as a revision of parent paste.