API Reference


Media methods allow you display, create, remove and manipulate media content in Media Factory.
Media.addToFavorites

This method adds a media item to the list of a user's favorites and may be called either with an API key having the media.addToFavorites permission or without an API key.

Using an API key with the media.addToFavorites permission a user ID may be provided as the owner of the favorite. Without an API key, the owner of the favorite will be the logged in read more »

Media.completeMultiPartUpload

The purpose of this method, is to mark the file as successfully uploaded once all the chunks for the file have been transferred

On success the status of the file will be set to 1(Queued), and a full array of the file data will be return, on failure the reason for failing will be returned.

read more »
Media.createMultiPartUpload

Begin a multi part upload with a call to this method, it will return an ID that will need to be used by either completeMultiPartUpload or abortMultiPartUpload.

Note:Minimum chunk size is 5M

read more »
Media.deleteFile

Use this method to delete 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 read more »

Media.getFiles

Returns a list of media based on provided parameters.

The actual return value is a struct with the totalCount and data properties. totalCount contains the number of items that would have been returned if there was no offset or limit specified.

pageSize has a maximum value of 500 - ie. no more than 500 media items will ever be returned from a single call read more »

Media.getTagList

Retrieve a list of tags for a media item.

This method returns an array containing a tag, hits and count key.

The response of this method can be sorted on 'tag', 'count' (for the number of occurrences of the tag) and 'hits' for the popularity of the tag.

read more »
Media.insertTextFile

Creates a new text file in Media Factory (filetype 4).

If a user ID is specified a check will be made to ensure the user exists, if the user doesn't this call will fail.

If a valid API KEY is supplied, the uid argument can be used to specify the user id. If this is not supplied, the file will be owned by the 'public' user. If no valid API KEY is supplied, a valid session token read more »

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 read more »

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 read more »

Media.rateFile

Use this method to rate a media item on a scale.

When this method is accessed without the use of a API key, user ID is ignored and the current session is being used to determine the user id. A user can only rate once for every file. If the user attempts to vote again, the previous rating will be replaced.

If returnData = 1 then the data from getFileInfo will be returned. This is read more »

Media.reportOffensive

This function marks a particular media as offensive.

Note: A user can report a media as offensive once, unless the user id is 1; user id 1 can mark the same media as offensive multiple times.

You can pass various optional parameters to this function, including the id of the user who reported the media as offensive and the reason why the media was reported offensive. If you read more »

Media.setModerationStatus

Sets the moderation status for a file.

Visit the article about moderation for more information.

read more »
Media.trashFile

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

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

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 read more »

Media.updateFile

Changes the properties of a media item.

read more »
Media.uploadCompleted

This is used in conjunction with media.getUploadURL, once the upload has been completed to Amazon, this method must be called to trigger the converters to handle the file.

read more »
Media.vote

Use this method to vote on the media item.

Voting on a media works in either of 2 ways:
1) Voting as a logged in user: this is done when uid is passed to the function or the user is actually logged in.
2) Making anonymous votes without reCaptcha.

read more »