API Reference

Media.makeShown

Use this method to make media public - ie. anyone can see it, subject to moderation and trash status.

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.makeShown ( mixed id, boolean recursive = true, mixed uid = NULL )

Arguments

NameTypeRequiredDefault valueDescription
idmixedRequirednoneA single media ID or an array of media IDs
recursivebooleanOptionaltrueThis argument is optional and defaults to true. When set to true all children, children of children, etc. will be made public. (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.filemobile.com/services/rest/media/makeShown?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 makeShown.

Add a Comment

  • captcha