Site:API:Content

From Metrixstream
(Difference between revisions)
Jump to: navigation, search
(Created page with "= Content = == Add Content == This API call is responsible for creating a content item. === Authentication Restrictions === Any authenticated user. === Required Parameter...")
 
(Required Parameters)
 
(14 intermediate revisions by one user not shown)
Line 11: Line 11:
 
=== Required Parameters ===
 
=== Required Parameters ===
  
;action=addcontent
+
* <code>action=addcontent</code>
;type
+
* <code>type</code>: blog,news,album,inventory,object,product,photoset,project,pledge,playlist,event
:blob,news,album,inventory,object,product,photoset,project,pledge,playlist,event
+
* <code>title</code>: the content item title; no more than 1000 characters
;title
+
:the content item title; no more than 1000 characters.
+
  
 
=== Optional Parameters ===
 
=== Optional Parameters ===
  
;description
+
* <code>description</code>: the content item description; no more than 65k characters
:the content item description; no more than 65k characters.
+
* <code>release_date</code>: the release date of this content item
;release_date
+
* <code>credits_per_minute</code>: the current amount of credits to stream this item on a per minute basis; only applies to videos and songs.
;credits_per_minute
+
* <code>credits_to_own</code>: the current amount of credits to purchase this item.
;credits_to_own
+
* <code>price</code>: the cash value of this item.
;price
+
:: only available for types that are not a product or project.
:only available for types that are not a product or project.
+
* <code>inventory</code>: only available for types that are event.
;inventory
+
* <code>label</code>: will be prefixed by the site's user prefix label.
:only available for types that are event.
+
* <code>addcategory</code>: an array of category ids
;label
+
* <code>addtag</code>: an array of tags
:will be prefixed by the site's user prefix label.
+
* <code>featured_on_content_id</code>: an advanced feature for featuring products during a live broadcast.
;addcategory
+
* <code>inventory:stock:quantity</code>: only available for types that are inventory; initializes stock to this value.
:an array of category ids
+
* <code>inventory:stock:external_id</code>: only available for types that are inventory; an optional external_id for this stock.
;addtag
+
* <code>inventory:stock:external2_id</code>: only available for types that are inventory; an optional external_id for this stock.
:an array of tags
+
* <code>inventory:stock:note</code>: only available for types that are inventory; an optional note for this stock.
 +
* <code>cst_*</code>: custom fields related to content
 +
:: replace the * with the appropriate custom field name
  
 
=== Successful Response ===
 
=== Successful Response ===
  
;status=ok
+
* <code>status=ok</code>
;item
+
* <code>item</code>
 +
** <code>contentId</code>: the id of the newly created content item
 +
** <code>canonicalId</code>: the canonical id of the newly created content item.
  
:;contentId
+
== Edit Content ==
:: the id of the newly created content item;
+
:;canonicalId
+
:: the canonical id of the newly created content item.
+
  
== Edit Comment ==
+
This API call is responsible for editing a content item.
 
+
This API call is responsible for editing a comment.
+
  
 
=== Authentication Restrictions ===
 
=== Authentication Restrictions ===
Line 55: Line 52:
 
=== Required Parameters ===
 
=== Required Parameters ===
  
;action=comment
+
* <code>action=editcontent</code>
;verb=editcomment
+
* <code>contentId</code>: the id of the content item
;commentId
+
:The id of the comment.
+
  
 
=== Optional Parameters ===
 
=== Optional Parameters ===
  
;msg
+
* <code>title</code>
:the comment message; Comment authors have a 15 minute window to edit their comment; Moderators can always edit.
+
* <code>description</code>
;approved=yes|no
+
* <code>access</code>
:the comment approval state; Only Moderators have access to this field.
+
* <code>release_date</code>
 
+
* <code>event_date</code>
=== Successful Response ===
+
* <code>live_host</code>
 
+
* <code>live_mode</code>
;status=ok
+
* <code>preview_offset</code>
 
+
* <code>preview_duration</code>
== Delete Comment ==
+
* <code>external_id</code>
 
+
* <code>allow_oversell</code>
This API call is responsible for deleting a comment.
+
* <code>price</code>
 
+
* <code>price1</code>
=== Authentication Restrictions ===
+
* <code>price2</code>
 
+
* <code>price3</code>
Moderators; Comment owners;
+
* <code>price4</code>
 
+
* <code>price_formula</code>
=== Required Parameters ===
+
* <code>credits_to_own</code>
 
+
* <code>credits_per_minute</code>
;action=comment
+
* <code>commission_ppm_percentage</code>
;verb=delcomment
+
* <code>commission_pto_percentage</code>
;commentId
+
* <code>commission_gift_percentage</code>
:The id of the comment.
+
* <code>commission_bandwidth_percentage</code>
 +
* <code>review</code>
 +
* <code>gift_credits</code>
 +
* <code>user</code>
 +
* <code>chat_muted</code>
 +
* <code>img:selected</code>
 +
* <code>img:title</code>
 +
* <code>img:position</code>
 +
* <code>photo_hint</code>
 +
* <code>add:relationship</code>
 +
* <code>del:relationship</code>
 +
* <code>playlist:media_id</code>
 +
* <code>image (multipart)</code>
 +
* <code>banner,banner1,banner2,banner3,banner4,banner5,banner6,banner7,banner8,banner9,banner10 (multipart)</code>
 +
* <code>banner,banner1,banner2,banner3,banner4,banner5,banner6,banner7,banner8,banner9,banner10</code>
 +
* <code>banner:photo,banner1:photo,banner2:photo,banner3:photo,banner4:photo,banner5:photo,banner6:photo,banner7:photo,banner8:photo,banner9:photo,banner10:photo</code>
 +
* <code>banner:screenshot,banner1:screenshot,banner2:screenshot,banner3:screenshot,banner4:screenshot,banner5:screenshot,banner6:screenshot,banner7:screenshot,banner8:screenshot,banner9:screenshot,banner10:screenshot</code>
 +
* <code>inventory</code>
 +
* <code>inventory:stock:quantity</code>
 +
* <code>featured_on_content_id</code>
 +
* <code>tags</code>
 +
* <code>addtag</code>
 +
* <code>deletetag</code>
 +
* <code>categories</code>
 +
* <code>addcategory</code>
 +
* <code>deletecategory</code>
 +
* <code>label</code>
 +
* <code>label_hint</code>
 +
* <code>cst_*</code>: custom fields related to content
 +
:: replace the * with the appropriate custom field name.
  
 
=== Successful Response ===
 
=== Successful Response ===
  
;status=ok
+
* <code>status=ok</code>
 +
* <code>properties</code>
 +
** <code>pending</code>
 +
** <code>approved</code>

Latest revision as of 10:52, 22 August 2012

Contents

[edit] Content

[edit] Add Content

This API call is responsible for creating a content item.

[edit] Authentication Restrictions

Any authenticated user.

[edit] Required Parameters

  • action=addcontent
  • type: blog,news,album,inventory,object,product,photoset,project,pledge,playlist,event
  • title: the content item title; no more than 1000 characters

[edit] Optional Parameters

  • description: the content item description; no more than 65k characters
  • release_date: the release date of this content item
  • credits_per_minute: the current amount of credits to stream this item on a per minute basis; only applies to videos and songs.
  • credits_to_own: the current amount of credits to purchase this item.
  • price: the cash value of this item.
only available for types that are not a product or project.
  • inventory: only available for types that are event.
  • label: will be prefixed by the site's user prefix label.
  • addcategory: an array of category ids
  • addtag: an array of tags
  • featured_on_content_id: an advanced feature for featuring products during a live broadcast.
  • inventory:stock:quantity: only available for types that are inventory; initializes stock to this value.
  • inventory:stock:external_id: only available for types that are inventory; an optional external_id for this stock.
  • inventory:stock:external2_id: only available for types that are inventory; an optional external_id for this stock.
  • inventory:stock:note: only available for types that are inventory; an optional note for this stock.
  • cst_*: custom fields related to content
replace the * with the appropriate custom field name

[edit] Successful Response

  • status=ok
  • item
    • contentId: the id of the newly created content item
    • canonicalId: the canonical id of the newly created content item.

[edit] Edit Content

This API call is responsible for editing a content item.

[edit] Authentication Restrictions

Moderators and Comment authors.

[edit] Required Parameters

  • action=editcontent
  • contentId: the id of the content item

[edit] Optional Parameters

  • title
  • description
  • access
  • release_date
  • event_date
  • live_host
  • live_mode
  • preview_offset
  • preview_duration
  • external_id
  • allow_oversell
  • price
  • price1
  • price2
  • price3
  • price4
  • price_formula
  • credits_to_own
  • credits_per_minute
  • commission_ppm_percentage
  • commission_pto_percentage
  • commission_gift_percentage
  • commission_bandwidth_percentage
  • review
  • gift_credits
  • user
  • chat_muted
  • img:selected
  • img:title
  • img:position
  • photo_hint
  • add:relationship
  • del:relationship
  • playlist:media_id
  • image (multipart)
  • banner,banner1,banner2,banner3,banner4,banner5,banner6,banner7,banner8,banner9,banner10 (multipart)
  • banner,banner1,banner2,banner3,banner4,banner5,banner6,banner7,banner8,banner9,banner10
  • banner:photo,banner1:photo,banner2:photo,banner3:photo,banner4:photo,banner5:photo,banner6:photo,banner7:photo,banner8:photo,banner9:photo,banner10:photo
  • banner:screenshot,banner1:screenshot,banner2:screenshot,banner3:screenshot,banner4:screenshot,banner5:screenshot,banner6:screenshot,banner7:screenshot,banner8:screenshot,banner9:screenshot,banner10:screenshot
  • inventory
  • inventory:stock:quantity
  • featured_on_content_id
  • tags
  • addtag
  • deletetag
  • categories
  • addcategory
  • deletecategory
  • label
  • label_hint
  • cst_*: custom fields related to content
replace the * with the appropriate custom field name.

[edit] Successful Response

  • status=ok
  • properties
    • pending
    • approved
Personal tools