Retrieve Pending Media

From KickApps Documentation

Jump to: navigation, search

Retrieve Pending Media call enables you to get a list of pending media for your community. You can also retrieve media based on media type and keywords. You can make an HTTP POST or GET request when making this call.

Your request will look something like the following:

http://api.kickapps.com/rest/manage/media/status/{as}

Contents

Parameters

As shown above, your call will include the following parameters:

  • status. The status in which the media is to be retrieved in. Supported statuses: approved, pending and rejected.
  • as. The site that you are searching. Each affiliate site has a unique as.

Post Parameters

For the first call, use the following values, pgNum "1", totPages "1" and totSize "0". The server will return the actual values for these post parameters, given your search criteria.

  • t. String. Required. Your access permissions.
  • callback. String. Optional. The name of your JavaScript callback function.
  • clientIP. String. Optional. Use the clientIP parameter to pass the IP address of the user making the call. If the IP has been blocked by the webmaster under the Affiliate Center -> Manage Members section, an error message will be returned starting with "status":"-1","error":"This IP address has been banned".
  • includeAudio. Optional. on or off. Default is on. Whether or not to return audio files.
  • includePhoto. on or off. Default is on. Whether or not to return photos.
  • includeVideo. on or off. Default is on. Whether or not to return video files.
  • includeBlog. on or off. Default is on. Whether or not to return blogs.
  • includeSet. on or off. Default is on. Whether or not to return sets.
  • userId. Optional. Integer. If passed media will only be returned for the user whose Id is passed.
  • pgNum. The current page number in the search results. For your first call, set pgNum to "1". For subsequent calls, set pgNum to the page you want to display.
  • pageSize. The number of results to display on each page.
  • totPage. The total number of pages returned. For your first call, set totPages to "1", for subsequent calls, set pgNum to the total number of pages you want to display to the member or to the value for totPages returned by the server.

JSON Payload

On success, a return that begins with "totSize":"","totPages":"","status":"1","error":"" where:

  • totSize. The total number of media.
  • totPages. The total number of pages that the media will display on.
  • status. 1 if the call was a success. -1 if the call produced an error.
  • error. If the call status is -1, error will contain descriptive text for the error.

The payload will contain the following for each search result:

  • mediaName. The descriptive name for the media.
  • mediaType. The type of search for which this media will appear in the results. Possible values are audio, photo, blogs and video.
  • userName. The username of the member who added the media.
  • createdAt. A nested object stating when the media was created in the following format. All times are returned as Greenwich Mean Time (GMT). dayofweek, month day, time AMorPM
This would appear as follows:
"createdAt":"Wednesday, Jul 7, 07:48"
  • isDisabled. true or false. In the Affiliate Center's Member Management area, affiliates can see and manage member status (pending/approved/disabled). If a member or media is disabled or pending, then the member or media is not searchable and does not appear to other members, only in the Affiliate Center.
  • mediaId. The id for the media.
  • pathToPreview. The URL to the media preview:
  • For a video, the file is transcoded and then five random screens are grabbed from the file. An affiliate can choose the preview image from among these screens, upload their own image, or use the default image.
  • For photo, this is a path to a thumbnail version of the image. This image was manually uploaded by the member and then automatically resized to for the thumbnail or is the default image.
  • For audio, this is a path either to a selected preview image loaded by the member or to the default image.
  • pathToMedia. The URL to the media displayed in the list.
  • tags. Zero or more searchable, descriptive keywords entered by members. Appears as a comma-separated list.
  • adminTags. Zero or more searchable, descriptive keywords entered by the administrator. Appears as a comma-separated list. Admin tags are not visible to the community members.
  • description. A text description of this media. This description is added by the owner when the media is uploaded.
  • userId. The id of the member who uploaded the media.
  • views. he number of times this media item was viewed. Increments each time the media item is viewed. Not supported for text blogs.
  • averageRating. The average rating calculated using all the ratings issued for this media.
  • numComments. The total number of comments added on this media.
  • isPrivacyEnabled. True or False. True if the media is private. False if media is public.

Permissions

Overview

KickConnect API call that lets you post activities done outside the community into the community activity feeds for members.

Your request will look something like the following:

http://api.kickapps.com/rest/kickconnect/{memberId}/{as} 

Parameters

As shown above, your call will include the following parameters:

  • memberId. The id of the user for who the update is being made.
  • as. The site Id to search. as is unique for each of the affiliate's sites.

Post Parameters

  • t. String. Required. Your access permissions.
  • callback. String. Optional. The name of your JavaScript callback function.
  • clientIP. String. Optional. Use the clientIP parameter to pass the IP address of the user making the call. If the IP has been blocked by the webmaster under the Affiliate Center -> Manage Members section, an error message will be returned starting with "status":"-1","error":"This IP address has been banned".
  • storyContent. Required. Accepts HTML and text. Allows 5,000 characters. Be sure to urlEncode the string that you pass for this variable.
  • storyIcon. Optional. url of the image to be associated with the story. Recommended size is 16 X 16.
  • postedFromSource. Optional. This is the name of the service from which the activity is being posted from. Allows 200 characters.
  • postToGroups. Optional. Should accept comma separated groupID's. Should only post to a group if the user is a member of that group.

JSON Payload

  • On success, the call will return "status":"1","message":"Story published successfully."
  • On failure, the call will return "status":"-1","message":"Story could not be published. Please make sure that the provided information is accurate."
  • If the user doesn't belong to the group(s) return, "status":"-1","message":"Story could not be published. Please make sure that the member belongs to the group(s)."

Permissions

List of KickApps API Calls


Note: Occasionally (and without advanced warning) we modify our API calls by adding new parameters in the response payload. Please keep this in mind when designing your strategy for parsing our responses.