API Reference

Media.untrashFile

Use this method to untrash file(s) from the system.

This method removes any cached data for media.getFileInfo ONLY if media.getFileInfo is called with no user ID and returnComments set to false. If media.getFileInfo is called with a user ID or returnComments set to true then stale data may be returned until the cache is refreshed. This will occur automatically after a few minutes.


Syntax

void media.untrashFile ( mixed id, boolean recursive = false )

Arguments

NameTypeRequiredDefault valueDescription
idmixedRequirednoneThis can be a single media ID or an array of valid media IDs.
recursivebooleanOptionalfalseThis optional argument allows you to untrash all recursive children of the specified media ID(s). For example this method will only untrash the specified media ID by default. To untrash all recursive children of the media specify this value as 1. Possible values are 0 => false and 1 => true.

Response

The response returned upon success of the request.

NameTypeDescriptionDefault Values
resultINT1 will be returned upon a successful request and response.1

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/media/untrashFile?id=[MEDIA_ID]&status=[MOEDERATION_STATUS]&APIKEY=[APIKEY]
http://api.newspark.ca/services/rest/media/untrashFile?id[]=[MEDIA_ID]&id[]=[MEDIA_ID]&status=[MODERATION_STATUS]&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
Sample JSON Response
{
    "status": true,
    "result": 1
}

Code examples

0 comments

Be the first to comment on untrashFile.

Add a Comment

  • captcha