Add/Remove Media To Group

From KickApps Documentation

Jump to: navigation, search

Calls to add and remove existing media to existing groups. You can make an HTTP POST or GET request for this call. This call may only be invoked if the token identifies the session as belonging to the administrator or the member who added the media to the community.

http://api.kickapps.com/rest/media/{mediaType}/{mediaId}/add/group/{groupId}/{as}
http://api.kickapps.com/rest/media/{mediaType}/{mediaId}/remove/group/{groupId}/{as}

Contents

Parameters

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

  • mediaType. The type of media to be added or removed. Supported media types: sets, video, audio, photo, emedia, blog.
  • memberId. The ID of the media to be added or removed.
  • groupId. The ID of the group to be retrieved.
  • as. The site that the group is a part of. 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".
  • updatedAt. Optional. The date on which the media should be marked as modified/updated. If its not passed the original updatedAt date of the media will be preserved. Format: mm/dd/yyyy hh:mm
  • createdAt. Optional. The date on which the media should be marked as created. If its not passed the original createdAt date of the media will be preserved. Format: mm/dd/yyyy hh:mm

JSON Payload

On success, a payload that begins with "status":"1","error":"" and includes updated media object. If there is no media assigned to the group it will return an empty media object.

  • 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 the updated media:

  • isPublicTaggingAllowed. True or False.
  • uploadToAkamai. A nested object stating when the media was uploaded to the KickApps CDN. All times are returned as Greenwich Mean Time (GMT).
dayofweek, month day, time AM or PM
This would appear as follows:
"uploadToAkamai":"Wednesday, Jul 7, 07:48"
  • categories. Category assigned to the media.
  • pathToMedia. The path to the stored media.
  • adminTags. Admin tags assigned to the media.
  • views. Number of times the media has been viewed.
  • isAdultContent. Whether the media is flagged for adult content. Note: this is a place holder for a future enhancement and is not currently used.
  • updatedAt. A nested object stating when the media was last updated. All times are returned as Greenwich Mean Time (GMT).
dayofweek, month day, time AM or PM
This would appear as follows:
"updatedAt":"Wednesday, Jul 7, 07:48"
  • country. The country the media is assigned to.
  • pathToPreview48X48. The url for the media thumbnail in size 48X48.
  • inappropriateFlagCount. The count for how many times a media has been flagged as inappropriate.
  • originalFileFormat. The original file format for the media.
  • name. The title of the media.
  • description. The description of the media.
  • createdAt. A nested object stating when the media was created. All times are returned as Greenwich Mean Time (GMT).
dayofweek, month day, time AM or PM
This would appear as follows:
"createdAt":"Wednesday, Jul 7, 07:48"
  • isVisible. true or false. Whether or not the media is visible to the community members.
  • postalCode. Postal code the media is assigned to.
  • isPublicCommentingAllowed. true or fase. Whether community members can comment on the media or not.
  • stateOrProvinceName. The state or province name assigned to the media.
  • id. The media id for the media.
  • reviewed. true or false. whether the media was reviewed by the webmaster or not.
  • city. City assigned to the media.
  • updatedBy. The member id for the member who last updated this media.
  • pathToPreview. The path 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.
  • type. The media type for the media. PHOTO, VIDEO, AUDIO, etc.
  • uploadToLimelight. Date and timestamp of upload to CDN that KickApps uses for storing video files.
  • votes. Number of times the media has been rated.
  • averageRating. Average rating for the media.
  • isPrivacyEnabled. True or False. True if the media is private. False if media is public.

Sample JSON Payload

 {"payload_type":"json","status":"1","error":"","photos":} 

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.