API Reference

Media.makeHidden

Use this method to make media hidden - ie. only the owner can see it.

This method requires a media ID or an array of IDs.

You must have permission to call this service on media owned by another user (including the public user '1'). Otherwise, you may only make your own media public; you must be logged in to do so. If you do not have permission to make any of the media specified public this function will immediately abort and some media that you specified may be left private.

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

returns media.makeHidden ( mixed id, boolean recursive = true, mixed uid = NULL )

Arguments

NameTypeRequiredDefault valueDescription
idmixedRequirednonesingle media id, or array with media ids
recursivebooleanOptionaltrueoptional, defaults to true, when true all children, children of children, etc., will be made private, (0=false, 1=true)
uidmixedOptionalNULL

Response

The response of the makeShown method.

NameTypeDescriptionPossible Values
resultINTWill return 1 on the successful response of this method.empty, 1, error message

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/media/makeHidden?id=[MEDIA_ID]
<?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 makeHidden.

Add a Comment

  • captcha