Functions


accept_terms

activate

add_file_comment

add_file_comment_vote

add_file_vote

add_user_message

billing_country

billing_details

billing_details_from_ares

billing_details_from_vies

billing_payments

cancel_upload

clear_file_password

clear_history

confirm_sms_payment

create_folder

dequeue_file

file_comments

file_exists

file_info

file_link

file_password_salt

file_protected

files

folder

folder_link

gallery

help

history

login

logout

logout_all_devices

logout_other_devices

move_file

news

payment

points_payment

queue

queue_file

register

remote_upload

remote_upload_progress

remove_file

rename_file

reset_password

salt

search

send_activation_code

session_history

set_billing_details

set_file_password

set_file_tags

set_user_email

set_user_password

similar_files

suggest

tie_files

tied_files

tied_files_link

toggle_https_download

toggle_newsletters

unsubscribe_newsletters

upload

upload_progress

upload_url

uploads

user_data

user_vouchers

validate_credentials

verify_file_password

voucher_campaign

voucher_payment

accept_terms()

Accept the current version of the terms and conditions.

@return Currently accepted version of the terms and conditions.

Request:

POST /api/accept_terms/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <terms_version>Currently accepted version of the terms and conditions.</terms_version>
</response>

activate(string code)

Activate the given user account.

@param string code The activation code sent to the user by an email message.
 
@return The user authentication/session token (WST).

Request:

POST /api/activate/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

code={The activation code sent to the user by an email message.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <token>The user authentication/session token (WST).</token>
</response>

add_file_comment(string file_ident, string body)

Add a new comment to the given file.

@param string file_ident The file identifier.
@param string body The body of the comment.

Request:

POST /api/add_file_comment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

file_ident={The file identifier.}&body={The body of the comment.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

add_file_comment_vote(string file_comment_ident, int type)

Add a vote to the given file comment. In order to vote a user has to be authenticated. A single user can vote only once for a single comment.

@param string file_comment_ident The file comment identifier.
@param int type The type of the vote (0 -> negative, 1 -> positive).

Request:

POST /api/add_file_comment_vote/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

file_comment_ident={The file comment identifier.}&type={The type of the vote (0 -> negative, 1 -> positive).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

add_file_vote(string file_ident, int type)

Add a vote to the given file.

@param string file_ident The file identifier.
@param int type The type of the vote (0 -> negative, 1 -> positive).

Request:

POST /api/add_file_vote/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

file_ident={The file identifier.}&type={The type of the vote (0 -> negative, 1 -> positive).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

add_user_message(string subject, string message, string email, string name, string uri)

Add a new feedback message.

@param string subject The subject of the feedback message.
@param string message The contents of the feedback message.
@param string email [optional] The user's email address.
@param string name [optional] The user's name.
@param string uri [optional] The URI from which the feedback was sent.

Request:

POST /api/add_user_message/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

subject={The subject of the feedback message.}&message={The contents of the feedback message.}&email={[optional] The user's email address.}&name={[optional] The user's name.}&uri={[optional] The URI from which the feedback was sent.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

billing_country()

Get available billing country list.

@return The list of a billing country.

Request:

POST /api/billing_country/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <country>
    <name>The country name.</name>
    <tin_regexp>The country id.</tin_regexp>
    <id>The country id.</id>
  </country>
</response>

billing_details()

Get the current user billing's details.

@return The current user billing's details.

Request:

POST /api/billing_details/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <billing_detail>
    <company_name>The billing company name</company_name>
    <email>The billing email</email>
    <crn>The billing company identification number</crn>
    <vat_number>The billing vat identification number</vat_number>
    <address1>The billing address1</address1>
    <address2>The billing address2</address2>
    <zip>The billing zipcode</zip>
    <city>The billing city</city>
    <region>The billing state/region</region>
    <country>The billing country</country>
    <specific_symbol>The billing specific symbol</specific_symbol>
    <created>The billing details created</created>
  </billing_detail>
</response>

billing_details_from_ares(int ic)

Get the billing's details from ARES.

@param int ic identification number
 
@return The billing's details from ARES.

Request:

POST /api/billing_details_from_ares/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ic={identification number}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <ares_detail>
    <name>The billing name</name>
    <in>The billing identification number</in>
    <tin>The billing tax identification number</tin>
    <addr_street>The billing street name</addr_street>
    <addr_street_nr>The billing street number</addr_street_nr>
    <addr_house_nr>The billing house number</addr_house_nr>
    <addr_zip>The billing zipcode</addr_zip>
    <addr_city>The billing city</addr_city>
    <addr_country>The billing country</addr_country>
  </ares_detail>
</response>

billing_details_from_vies(int|string vat, string country)

Get the billing's details from VIES.

@param int|string vat identification number
@param string country (optional) country code ( [A-Z]{2} )
 
@return The billing's details from VIES.

Request:

POST /api/billing_details_from_vies/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

vat={identification number}&country={(optional) country code ( [A-Z]{2} )}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <vies_detail>
    <name>The company name</name>
    <tin>The billing vat identification number</tin>
    <addr1>The company address</addr1>
    <addr_city>The company city</addr_city>
    <addr_zip>The company zipcode</addr_zip>
    <addr_country>The company country</addr_country>
    <valid>is valid vat number</valid>
  </vies_detail>
</response>

billing_payments(int offset, int limit)

Get the billing's list of payments.

@param int offset [optional] The list offset.
@param int limit [optional] The maximum of listed files.
 
@return The billing's list of payments.

Request:

POST /api/billing_payments/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

offset={[optional] The list offset.}&limit={[optional] The maximum of listed files.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <payment>
    <source>Is voucher or payment</source>
    <payment_id>The ID of the payment</payment_id>
    <user_id>The identification of user</user_id>
    <created>Date and Time of payment created</created>
    <amount>The payment amount</amount>
    <months>The number of pay mounths</months>
    <extra_days>The bonus extra days</extra_days>
    <confirmed_at>Date and Time confirmation of payment</confirmed_at>
    <aborted>Is payment aborted ?</aborted>
    <currency>The currency of payment</currency>
    <file>The url of invoice file</file>
  </payment>
</response>

cancel_upload(string file_ident)

Cancel given file upload.

@param string file_ident The file identifier.

Request:

POST /api/cancel_upload/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

file_ident={The file identifier.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

clear_file_password(string ident)

Clear a file password.

@param string ident The identifier of the file which password should be cleared.

Request:

POST /api/clear_file_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file which password should be cleared.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

clear_history(int[] ids)

Clear the download history of the current user.

@param int[] ids [optional] The list of IDs of the records to be deleted.

Request:

POST /api/clear_history/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ids={[optional] The list of IDs of the records to be deleted.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

confirm_sms_payment(string code)

Confirm an SMS payment.

@param string code The SMS payment confirmation code.

Request:

POST /api/confirm_sms_payment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

code={The SMS payment confirmation code.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

create_folder(string path, int private)

Create a new folder.

@param string path The path to the folder. Parent folders are created automatically if necessary.
@param int private Tells whether the folder should be private (0 -> no, 1 -> yes).
 
@return The identifier of the newly created folder and its sanitized name.

Request:

POST /api/create_folder/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

path={The path to the folder. Parent folders are created automatically if necessary.}&private={Tells whether the folder should be private (0 -> no, 1 -> yes).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <ident>The identifier of the newly created folder.</ident>
  <name>Sanitized name of the newly created folder.</name>
  <path>The path to the newly created folder.</path>
</response>

dequeue_file(string ident)

Remove the given file from the download queue.

@param string ident The identifier of the file.

Request:

POST /api/dequeue_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

file_comments(string ident, string password)

Get the list of user comments for the given file.

@param string ident The identifier of the file.
@param string password [optional] The file password digest SHA1(MD5_CRYPT(password)).
 
@return The list of user comments for the given file.

Request:

POST /api/file_comments/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}&password={[optional] The file password digest SHA1(MD5_CRYPT(password)).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <comment>
    <ident>The identifier of the comment.</ident>
    <created>The date and time when the comment was created.</created>
    <body>The body of the comment.</body>
    <username>The username of the user who sent the comment.</username>
    <positive_votes>The number of positive votes.</positive_votes>
    <negative_votes>The number of negative votes.</negative_votes>
  </comment>
</response>

file_exists(string ident)

Tell whether or not the given file exists.

@param string ident The identifier of the file.
 
@return 1 if the given file exists, 0 otherwise.

Request:

POST /api/file_exists/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <exists>1 if the given file exists, 0 otherwise.</exists>
</response>

file_info(string ident, string password, int maybe_removed)

Get information about the given file.

@param string ident The identifier of the file.
@param string password [optional] File password digest SHA1(MD5_CRYPT(password)).
@param int maybe_removed [optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes).
 
@return Information about the given file.

Request:

POST /api/file_info/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}&password={[optional] File password digest SHA1(MD5_CRYPT(password)).}&maybe_removed={[optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <name>The name of the file.</name>
  <description>The description of the file.</description>
  <size>The size of the file in bytes.</size>
  <type>The extension of the file.</type>
  <adult>Tells whether the file is an explicit adult content (0 -&gt; No, 1 -&gt; Yes).</adult>
  <queued>Tells whether the file is queued for later download.</queued>
  <positive_votes>The number of positive votes.</positive_votes>
  <negative_votes>The number of negative votes.</negative_votes>
  <available>Tells whether the file is available for download (0 -&gt; No, 1 -&gt; Yes).</available>
  <password>Tells whether or not the file is password protected (0 -&gt; No, 1 -&gt; Yes).</password>
  <removed>Tells whether or not the file was removed (0 -&gt; No, 1 -&gt; Yes).</removed>
  <removed_at>When the file was removed.</removed_at>
  <removal_reason>Tells why the file was removed.</removal_reason>
  <stripe_count>The number of the file previews.</stripe_count>
  <stripe>The URL of the file preview stripe.</stripe>
</response>

file_password_salt(string ident)

Get password salt of the given file.

@param string ident The identifier of the file.
 
@return The password salt of the given file.

Request:

POST /api/file_password_salt/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <salt>The password salt of the given file.</salt>
</response>

file_protected(string ident)

Tell whether or not the given file is password protected.

@param string ident The identifier of the file.
 
@return 1 if the given file is password protected, 0 otherwise.

Request:

POST /api/file_protected/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <protected>1 if the given file is password protected, 0 otherwise.</protected>
</response>

files(string path, string sort_by, string sort_order, int private, string search, int include_removed, int limit, int offset)

Get the list of a user's files and folders.

@param string path The folder path.
@param string sort_by [optional] How the list should be sorted (name, size, downloads, created).
@param string sort_order [optional] How to order items in the list (asc, desc).
@param int private [optional] Tells whether to get a list of private files/folders (0 -> No, 1 -> Yes).
@param string search [optional] A term to be searched within file/folder names.
@param int include_removed [optional] Tells whether or not to include removed items in the list (0 -> No, 1 -> Yes).
@param int limit [optional] The maximum of items loaded.
@param int offset [optional] The loaded items offset.
 
@return The list of a user's files and folders.

Request:

POST /api/files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

path={The folder path.}&sort_by={[optional] How the list should be sorted (name, size, downloads, created).}&sort_order={[optional] How to order items in the list (asc, desc).}&private={[optional] Tells whether to get a list of private files/folders (0 -> No, 1 -> Yes).}&search={[optional] A term to be searched within file/folder names.}&include_removed={[optional] Tells whether or not to include removed items in the list (0 -> No, 1 -> Yes).}&limit={[optional] The maximum of items loaded.}&offset={[optional] The loaded items offset.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <folder>
    <ident>The folder identifier.</ident>
    <name>The folder name.</name>
    <created>The date and time of creation.</created>
    <removed>Tells whether or not the folder was removed (0 -&gt; No, 1 -&gt; Yes).</removed>
    <removed_at>When the folder was removed.</removed_at>
    <path>Path to this folder.</path>
  </folder>
  <file>
    <ident>The file identifier.</ident>
    <name>The file name.</name>
    <size>The file size.</size>
    <downloads>The number of downloads.</downloads>
    <type>The file type.</type>
    <created>The date and time of creation.</created>
    <state>The file state.</state>
    <password>Tells whether or not the file is password protected (0 -&gt; No, 1 -&gt; Yes).</password>
    <removed>Tells whether or not the file was removed (0 -&gt; No, 1 -&gt; Yes).</removed>
    <removed_at>When the file was removed.</removed_at>
    <path>Path to this file.</path>
  </file>
</response>

folder(string ident, int limit, int offset)

Get files from the given folder.

@param string ident The identifier of the folder.
@param int limit [optional] The maximum of items loaded.
@param int offset [optional] The loaded items offset.
 
@return The files from the given folder.

Request:

POST /api/folder/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the folder.}&limit={[optional] The maximum of items loaded.}&offset={[optional] The loaded items offset.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <name>The name of the folder.</name>
  <total>The number of found files.</total>
  <size>The total size of all files in the folder.</size>
  <file>
    <ident>The identifier of the file.</ident>
    <name>The name of the file.</name>
    <type>The type of the file.</type>
    <img>The preview of the file.</img>
    <stripe>The preview stripe.</stripe>
    <stripe_count>The number of previews in the stripe.</stripe_count>
    <size>The size of the file.</size>
  </file>
</response>

help()

Get the list of all documented API functions.

@return The list of all documented API functions.

Request:

POST /api/help/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <function>
    <name>The name of the function.</name>
    <args>The list of arguments.</args>
    <desc>The description of the function.</desc>
  </function>
</response>

history(int offset, int limit)

Get download history of a user.

@param int offset The list offset.
@param int limit The maximum of listed files.
 
@return Download history of a user.

Request:

POST /api/history/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

offset={The list offset.}&limit={The maximum of listed files.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <total>The number of all downloads in the history.</total>
  <file>
    <download_id>The download ID.</download_id>
    <ident>The downloaded file identifier.</ident>
    <name>The downloaded file name.</name>
    <size>The downloaded file size.</size>
    <started_at>The time when the download started.</started_at>
    <ended_at>The time when the download ended.</ended_at>
  </file>
</response>

login(string username_or_email, string password, int keep_logged_in)

Authenticate a user.

@param string username_or_email The username or email address of the user.
@param string password The user's password digest SHA1(MD5_CRYPT(password)).
@param int keep_logged_in Tells whether to keep the user authenticated for a longer period of time (0 -> No, 1 -> Yes).
 
@return A session security token (WST).

Request:

POST /api/login/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

username_or_email={The username or email address of the user.}&password={The user's password digest SHA1(MD5_CRYPT(password)).}&keep_logged_in={Tells whether to keep the user authenticated for a longer period of time (0 -> No, 1 -> Yes).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <token>A session security token (WST).</token>
</response>

logout()

Log out the currently logged user.

Request:

POST /api/logout/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

logout_all_devices()

Log out the currently logged user on all the devices.

Request:

POST /api/logout_all_devices/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

logout_other_devices()

Log out the currently logged user on all other devices.

Request:

POST /api/logout_other_devices/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

move_file(string src, string dest, int private, int src_private, int dest_private)

Move the given file or folder to another destination. The destination file or folder will be overwritten.

@param string src The source path of the file or folder.
@param string dest The path of the destination folder to which the file should be moved (it does not need to exist).
@param int private [optional] Tells whether or not both the source and the destination are private (0 -> No, 1 -> Yes).
@param int src_private [optional] Tells whether or not the source path is private (0 -> No, 1 -> Yes).
@param int dest_private [optional] Tells whether or not the destination folder is private (0 -> No, 1 -> Yes).

Request:

POST /api/move_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

src={The source path of the file or folder.}&dest={The path of the destination folder to which the file should be moved (it does not need to exist).}&private={[optional] Tells whether or not both the source and the destination are private (0 -> No, 1 -> Yes).}&src_private={[optional] Tells whether or not the source path is private (0 -> No, 1 -> Yes).}&dest_private={[optional] Tells whether or not the destination folder is private (0 -> No, 1 -> Yes).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

news(integer last_id, string lang)

Get the news.

@param integer last_id The ID of the last received news.
@param string lang [optional] News language (CZ, SK, PL or EN).
 
@return The news.

Request:

POST /api/news/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

last_id={The ID of the last received news.}&lang={[optional] News language (CZ, SK, PL or EN).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <news>
    <id>The news ID.</id>
    <created>The date of creation.</created>
    <title>The title of the news.</title>
    <body>The body of the news.</body>
    <link>The link.</link>
  </news>
</response>

payment(string method, int months, string country)

Initiate a new payment.

@param string method Payment method (card, transfer, points).
@param int months The number of months to pay for.
@param string country [optional] Country code (cz -> default or sk), currently relevant only for transfer method.
 
@return A URL to which the user should be redirected to.

Request:

POST /api/payment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

method={Payment method (card, transfer, points).}&months={The number of months to pay for.}&country={[optional] Country code (cz -> default or sk), currently relevant only for transfer method.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <url>A URL to which the user should be redirected to.</url>
</response>

points_payment(int months, string country)

Create a new points payment.

@param int months The number of months to be paid.
@param string country The user's country (cz, sk).

Request:

POST /api/points_payment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

months={The number of months to be paid.}&country={The user's country (cz, sk).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

queue(int offset, int limit)

Get a user's download queue.

@param int offset The list offset.
@param int limit The maximum of listed files.
 
@return A user's download queue.

Request:

POST /api/queue/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

offset={The list offset.}&limit={The maximum of listed files.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <total>The number of all downloads in the queue.</total>
  <file>
    <ident>The identifier of the file.</ident>
    <name>The name of the file.</name>
    <size>The size of the file.</size>
    <img>The preview of the file.</img>
    <stripe>The preview stripe.</stripe>
    <stripe_count>The number of previews in the stripe.</stripe_count>
    <downloaded>Tells whether or not this file was downloaded by the user (0 -&gt; No, 1 -&gt; Yes).</downloaded>
  </file>
</response>

queue_file(string ident)

Add the given file to the download queue.

@param string ident The identifier of the file.

Request:

POST /api/queue_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

register(string username, string email, string password, string affil_id, string recommend)

Create a new user account.

@param string username New user's (nick)name.
@param string email New user's email address.
@param string password New user's password or its hash (MD5Crypt).
@param string affil_id [optional] Affiliate ID.
@param string recommend [optional] Identifier of the user who recommended WS.
 
@return The user authentication/session token (WST).

Request:

POST /api/register/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

username={New user's (nick)name.}&email={New user's email address.}&password={New user's password or its hash (MD5Crypt).}&affil_id={[optional] Affiliate ID.}&recommend={[optional] Identifier of the user who recommended WS.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <token>The user authentication/session token (WST).</token>
</response>

remote_upload(string uri)

Start a new remote upload.

@param string uri The remote file URI.
 
@return Information about the remote file.

Request:

POST /api/remote_upload/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

uri={The remote file URI.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <id>The ID of the newly created remote upload.</id>
  <file_ident>The identifier of the file.</file_ident>
  <file_name>The name of the remote file.</file_name>
  <file_size>The size of the remote file.</file_size>
</response>

remote_upload_progress(string id)

Get information about the given remote upload progress.

@param string id The ID of the remote upload.
 
@return Information about the given remote upload progress.

Request:

POST /api/remote_upload_progress/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

id={The ID of the remote upload.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <ident>The identifier of the file.</ident>
  <uploaded_bytes>The number of already uploaded bytes.</uploaded_bytes>
  <size>The size of the remote file in bytes.</size>
  <done>Tells whether the uploading is done (0 -&gt; No, 1 -&gt; Yes).</done>
</response>

remove_file(string ident)

Remove the given file or folder.

@param string ident The identifier of the file or folder.

Request:

POST /api/remove_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file or folder.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

rename_file(string ident, string name)

Rename the given file or folder.

@param string ident The identifier of the file or folder.
@param string name The new name of the file or folder.
 
@return The new name of the file or folder.

Request:

POST /api/rename_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file or folder.}&name={The new name of the file or folder.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <new_name>The new (possibly sanitized) name of the file or folder.</new_name>
</response>

reset_password(string email_or_username, string lang)

Reset a user password.

@param string email_or_username The email address or username of the user.
@param string lang [optional] Language.

Request:

POST /api/reset_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

email_or_username={The email address or username of the user.}&lang={[optional] Language.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

salt(string username_or_email)

Get the given user's password salt.

@param string username_or_email The username or email address of the user.
 
@return The given user's password salt.

Request:

POST /api/salt/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

username_or_email={The username or email address of the user.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <salt>The given user&#039;s password salt.</salt>
</response>

send_activation_code()

Send e-mail message with activation code to the user's e-mail address.

Request:

POST /api/send_activation_code/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

session_history()

Get the current user's session history.

@return The current user's session history.

Request:

POST /api/session_history/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <record>
    <created>When the session was created.</created>
    <ip_address>The IP address from which the session was created.</ip_address>
    <browser>The browser from which the session was created.</browser>
    <country_code>The code of the country from which the session was created.</country_code>
    <country_name>The name of the country from which the session was created.</country_name>
  </record>
</response>

set_billing_details(string company_name, string address1, string address2, string zip, string city, string region, string country, number crn, number vat_number)

Set the billing's details.

@param string company_name The billing name (compamy name).
@param string address1 The billing street name.
@param string address2 The billing additional address.
@param string zip The billing zipcode.
@param string city The billing city.
@param string region The billing state/region.
@param string country The billing country.
@param number crn [optional] The billing identification number.
@param number vat_number [optional] The billing tax identification number.

Request:

POST /api/set_billing_details/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

company_name={The billing name (compamy name).}&address1={The billing street name.}&address2={The billing additional address.}&zip={The billing zipcode.}&city={The billing city.}&region={The billing state/region.}&country={The billing country.}&crn={[optional] The billing identification number.}&vat_number={[optional] The billing tax identification number.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

set_file_password(string ident, string password)

Set a file password.

@param string ident The identifier of the file.
@param string password The file password digest (MD5_CRYPT(password)).

Request:

POST /api/set_file_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}&password={The file password digest (MD5_CRYPT(password)).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

set_file_tags(string ident, map<string,string> tags)

Set the tags of the given file or folder.

@param string ident The identifier of the file or folder.
@param map<string,string> tags Collection of tags (private => 0 or 1, adult => 0 or 1, to_be_removed => 0 or 1).

Request:

POST /api/set_file_tags/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file or folder.}&tags={Collection of tags (private => 0 or 1, adult => 0 or 1, to_be_removed => 0 or 1).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

set_user_email(string email)

Set the current user's email address.

@param string email The new email address of the user.

Request:

POST /api/set_user_email/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

email={The new email address of the user.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

set_user_password(string old_password, string new_password)

Set the current user's password.

@param string old_password The old password digest (MD5CRYPT(password)) of the user.
@param string new_password The new password digest (MD5CRYPT(password)) of the user.

Request:

POST /api/set_user_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

old_password={The old password digest (MD5CRYPT(password)) of the user.}&new_password={The new password digest (MD5CRYPT(password)) of the user.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

similar_files(string what, string sort, int limit, int offset, string category)

Search similar files.

@param string what The text to be searched within file names.
@param string sort [optional] How the search results should be sorted (recent, rating, largest, smallest).
@param int limit [optional] The maximum of the number of found files.
@param int offset [optional] The search results offset.
@param string category [optional] The category of searched files (video, images, audio, docs, archives).
 
@return The list of found files.

Request:

POST /api/similar_files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

what={The text to be searched within file names.}&sort={[optional] How the search results should be sorted (recent, rating, largest, smallest).}&limit={[optional] The maximum of the number of found files.}&offset={[optional] The search results offset.}&category={[optional] The category of searched files (video, images, audio, docs, archives).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <subtitles>
    <file>
      <ident>The identifier of the file.</ident>
      <name>The name of the file.</name>
      <type>The type of the file.</type>
      <img>The preview of the file.</img>
      <stripe>The preview stripe.</stripe>
      <stripe_count>The number of previews in the stripe.</stripe_count>
      <size>The size of the file.</size>
      <queued>Tells whether the file was queued for later download.</queued>
    </file>
  </subtitles>
  <next_episode>
    <file>
      <ident>The identifier of the file.</ident>
      <name>The name of the file.</name>
      <type>The type of the file.</type>
      <img>The preview of the file.</img>
      <stripe>The preview stripe.</stripe>
      <stripe_count>The number of previews in the stripe.</stripe_count>
      <size>The size of the file.</size>
      <queued>Tells whether the file was queued for later download.</queued>
    </file>
  </next_episode>
  <similar>
    <file>
      <ident>The identifier of the file.</ident>
      <name>The name of the file.</name>
      <type>The type of the file.</type>
      <img>The preview of the file.</img>
      <stripe>The preview stripe.</stripe>
      <stripe_count>The number of previews in the stripe.</stripe_count>
      <size>The size of the file.</size>
      <queued>Tells whether the file was queued for later download.</queued>
    </file>
  </similar>
</response>

suggest(string what, int limit)

Suggest file names to search.

@param string what The phrase to be searched for.
@param int limit [optional] The maximum of the number of suggestions.
 
@return The list of suggestions.

Request:

POST /api/suggest/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

what={The phrase to be searched for.}&limit={[optional] The maximum of the number of suggestions.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <suggestion>
    <value>A suggestion text value.</value>
  </suggestion>
</response>

tie_files(string[] idents)

Create a new file bundle.

@param string[] idents The list of identifiers of the files to be bundled.
 
@return The identifier of the newly created file bundle.

Request:

POST /api/tie_files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

idents={The list of identifiers of the files to be bundled.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <ident>The identifier of the newly created file bundle.</ident>
</response>

tied_files(string ident)

Get files from the given bundle.

@param string ident The identifier of the bundle.
 
@return The files from the given bundle.

Request:

POST /api/tied_files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the bundle.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <total>The number of found files.</total>
  <size>The total size of all files in the bundle.</size>
  <file>
    <ident>The identifier of the file.</ident>
    <name>The name of the file.</name>
    <type>The type of the file.</type>
    <img>The preview of the file.</img>
    <stripe>The preview stripe.</stripe>
    <stripe_count>The number of previews in the stripe.</stripe_count>
    <size>The size of the file.</size>
  </file>
</response>

toggle_https_download()

Enable/disable HTTPS for file downloads.

@return 1 if HTTPS was enabled, 0 otherwise.

Request:

POST /api/toggle_https_download/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <enabled>1 if HTTPS was enabled, 0 otherwise.</enabled>
</response>

toggle_newsletters()

Enable/disable sending of newsletters.

@return 1 if the sending was enabled, 0 otherwise.

Request:

POST /api/toggle_newsletters/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <enabled>1 if the sending was enabled, 0 otherwise.</enabled>
</response>

unsubscribe_newsletters()

Unsubscribe user from newsletters.

Request:

POST /api/unsubscribe_newsletters/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

upload(string ident, int total, int offset, string description)

Process the uploaded file.

@param string ident [optional] The identifier of the uploaded file.
@param int total [optional] The total size of the uploaded file.
@param int offset [optional] The position to which seek the file pointer.
@param string description [optional] The description of the uploaded file.
 
@return The result of the operation.

Request:

POST /api/upload/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={[optional] The identifier of the uploaded file.}&total={[optional] The total size of the uploaded file.}&offset={[optional] The position to which seek the file pointer.}&description={[optional] The description of the uploaded file.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <ident>The identifier of the uploaded file.</ident>
</response>

upload_progress(string file_ident)

Get an upload progress.

@param string file_ident The file identifier.
 
@return The upload progress.

Request:

POST /api/upload_progress/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

file_ident={The file identifier.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <uploaded_bytes>Number of uploaded bytes so far.</uploaded_bytes>
  <done>Tells whether or not the file upload is done (0 -&gt; No, 1 -&gt; Yes).</done>
</response>

upload_url()

Get a URL which files should be uploaded to.

@return A URL which files should be uploaded to.

Request:

POST /api/upload_url/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <url>A URL which files should be uploaded to.</url>
</response>

uploads(int limit, int offset)

Get list of all the files uploaded by a user.

@param int limit [optional] The maximum items loaded.
@param int offset [optional] The loaded items offset.

Request:

POST /api/uploads/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

limit={[optional] The maximum items loaded.}&offset={[optional] The loaded items offset.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <file>
    <ident>The file identifier.</ident>
    <name>The file name.</name>
    <size>The file size.</size>
    <type>The file type.</type>
    <uploaded>The date and time of upload.</uploaded>
    <state>The file state.</state>
    <downloads>The number of downloads.</downloads>
    <password>Tells whether or not the file is password protected (0 -&gt; No, 1 -&gt; Yes).</password>
    <path>The current path to the file.</path>
  </file>
</response>

user_data()

Get the current user's data.

@return The current user's data.

Request:

POST /api/user_data/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <id>The ID of the user.</id>
  <ident>The identifier of the user.</ident>
  <username>The username of the user.</username>
  <email>The email address of the user.</email>
  <points>The number of points collected by the user.</points>
  <files>The number of files the user currently has.</files>
  <bytes>The total size in bytes of all the user&#039;s files.</bytes>
  <score_files>The number of the user&#039;s files which have been downloaded by other users.</score_files>
  <score_bytes>The total size of all the user&#039;s files which have been downloaded by other users.</score_bytes>
  <private_files>The number of private files the user currently has.</private_files>
  <private_bytes>The total size in bytes of all the user&#039;s private files.</private_bytes>
  <private_space>The size in bytes of the user&#039;s private space.</private_space>
  <tester>Tells whether the user is a tester (0 -&gt; No, 1 -&gt; Yes).</tester>
  <vip>Tells whether the user is a VIP (0 -&gt; No, 1 -&gt; Yes).</vip>
  <vip_days>The number of days for which the user remain a VIP.</vip_days>
  <vip_hours>The number of hours for which the user remain a VIP.</vip_hours>
  <vip_minutes>The number of minutes for which the user remain a VIP.</vip_minutes>
  <vip_until>The date and time until which the user remain a VIP.</vip_until>
  <terms_version>Currently accepted version of the terms and conditions.</terms_version>
  <email_verified>Tells whether or not the user&#039;s email address is verified (0 -&gt; No, 1 -&gt; Yes).</email_verified>
</response>

user_vouchers()

Get the list of a user's vouchers.

@return The list of a user's vouchers.

Request:

POST /api/user_vouchers/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <unused_voucher>
    <code>The voucher code.</code>
    <months>The number of months of being a VIP.</months>
    <days>The number of days of being a VIP.</days>
    <price>The price paid for the voucher.</price>
    <currency>Currency code.</currency>
    <paid>When the voucher was paid for.</paid>
    <url>[optional] The URL of the voucher PDF file.</url>
  </unused_voucher>
  <used_voucher>
    <code>The voucher code.</code>
    <months>The number of months of being a VIP.</months>
    <days>The number of days of being a VIP.</days>
    <price>The price paid for the voucher.</price>
    <currency>Currency code.</currency>
    <used>When the voucher was used.</used>
    <seller>The name of the voucher seller.</seller>
    <url>[optional] The URL of the voucher PDF file.</url>
  </used_voucher>
</response>

validate_credentials(string username, string email, string password, string password_again)

Validate the given user credentials.

@param string username A username.
@param string email An email address.
@param string password Password hashed by md5crypt algorithm (if you absolutely must you can send plain text).
@param string password_again Password hashed by md5crypt algorithm (if you absolutely must you can send plain text).
 
@return The validation results.

Request:

POST /api/validate_credentials/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

username={A username.}&email={An email address.}&password={Password hashed by md5crypt algorithm (if you absolutely must you can send plain text).}&password_again={Password hashed by md5crypt algorithm (if you absolutely must you can send plain text).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <email_exists>Tells whether the given email address already exists or not (0 -&gt; No, 1 -&gt; Yes).</email_exists>
  <username>Tells whether the given username is valid (0 -&gt; No, 1 -&gt; Yes).</username>
  <email>Tells whether the given email address is valid (0 -&gt; No, 1 -&gt; Yes).</email>
  <password>Tells whether the given password is valid (0 -&gt; No, 1 -&gt; Yes).</password>
  <password_again>Tells whether the given passwords match (0 -&gt; No, 1 -&gt; Yes).</password_again>
</response>

verify_file_password(string ident, string password)

Verify a file password.

@param string ident The identifier of the file.
@param string password The file password digest (SHA1(MD5_CRYPT(password))).
 
@return 1 if the given file password digest (SHA1(MD5_CRYPT(password))) is correct, 0 otherwise.

Request:

POST /api/verify_file_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

ident={The identifier of the file.}&password={The file password digest (SHA1(MD5_CRYPT(password))).}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
  <correct>1 if the given file password digest (SHA1(MD5_CRYPT(password))) is correct, 0 otherwise.</correct>
</response>

voucher_campaign()

Get currently running voucher campaign.

Request:

POST /api/voucher_campaign/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>

voucher_payment(string code)

Apply the given voucher code.

@param string code The code of the voucher to be applied.

Request:

POST /api/voucher_payment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

code={The code of the voucher to be applied.}

Response:

HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0"?>
<response>
  <status>OK</status>
</response>