Add Custom Meta Data

From KickApps Documentation

Jump to: navigation, search

Contents

Overview

Custom Meta Data allows you to store variable quantities of meta data (name-value pairs) in reference to media and user objects within the KIT Cloud Social data storage system. These name-value pairs can be used to filter feed results as well as retrieved for specific media item or user. You can also retrieve all name-value pairs added by a user on a media or user.

Your request will look something like this:

http://api.kickapps.com/rest/media/meta/add/{mediaType}/{mediaId}/{as}

Parameters

  • mediaType. String. The media Type of the media item to which these name-value pairs are being added. Supported media types photo,blog,emedia(externalMedia),video,audio,and user.
  • mediaId. Integer. The media id of the media to which these name-value pairs are being added.
  • as. Integer. Your communities affiliate site id. Every community has a unique affiliate site id.

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".
  • meta. – The meta parameter will take a semi-colon separated list of name-value pairs encoded for URI Component.
For example:
"meta=size=small;color=brown", Would set the meta pairs size=smalland color=brown
If the name already exists for the provided userId in the meta for this media object the value associated with the name-value pair will be updated to the new value provided.
  • url. Required only when media type is emedia.

Payload

On success, a return that begins with "status":"1","message":"Media meta data added successfully ".

On failiure, a return that begins with "status":"-1","INFO":"There is some problem with your information.". {"payload_type":"json","status":1,"results":"","error":""}

or "status":"-1","INFO":"There is some problem with your information.". {"payload_type":"json","status":1,"results":"","error":"Name or value should not be either greater than 128. "}

or "status":"-1","INFO":"There is some problem with your information.". {"payload_type":"json","status":1,"results":"","error":"Name should not be illegal character."}

or "status":"-1","INFO":"There is some problem with your information.". {"payload_type":"json","status":1,"results":"","error":"Value should not be illegal character."}

or "status":"-1","INFO":"There is some problem with your information.". {"payload_type":"json","status":1,"results":"","error":"Invalid name value pair format"}

Permissions

All user types can make this call. The token userId will be used to indicate the “created by” information.

Limitations

There is no explicit limit on the number of meta tags for each media item but the name and value fields will be limited as follows:

  • Name. No more than 128 alpha-numeric characters. May contain “-“ and “_” but no other characters.
  • Value.No more than 128 alpha-numeric characters. May contain “-“ (hyphen), “.” (dot), “_” (underscore), “?” (question mark), “!” (exclamation), “(“ (paren open),”)” (paren close), “&” (ampersand), “@” (at), “$” (dollar), ","(Comma) and “ “(Space) but no other characters.

Note: These text values and names must be “URL Component” encoded to ensure that special characters such as ampersand and question mark are handled appropriately.

List of Kit Cloud Social 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.