|
|
(5 intermediate revisions by one user not shown) |
Line 1: |
Line 1: |
− | = Comments = | + | == Introduction == |
| | | |
− | == Add Comment ==
| + | Below you will find links to each particular component of the Site API. Detailed API information is available by clicking on each link. |
| | | |
− | This API call is responsible for adding a comment to an object.
| + | === Main Sections === |
| | | |
− | === Authentication Restrictions ===
| + | ; [[Site:API:Comments|Comments]] |
− | | + | ; [[Site:API:Forums|Forums]] |
− | Any authenticated user.
| + | ; [[Site:API:PCR|Property Change Requests]] |
− | | + | ; [[Site:API:Wysiwyg|Wysiwyg Editor]] |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=comment | + | |
− | ;verb=addcomment
| + | |
− | ;objtype
| + | |
− | :content, owner, user | + | |
− | ;objid
| + | |
− | ;msg
| + | |
− | :the comment message; no more than 2048 characters.
| + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | ;comment
| + | |
− | :;id
| + | |
− | ::: the id of the newly created comment.
| + | |
− | | + | |
− | == Edit Comment ==
| + | |
− | | + | |
− | This API call is responsible for editing a comment.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Moderators and Comment authors.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=comment
| + | |
− | ;verb=editcomment
| + | |
− | ;commentId
| + | |
− | :The id of the comment. | + | |
− | | + | |
− | === Optional Parameters ===
| + | |
− | | + | |
− | ;msg | + | |
− | :the comment message; Comment authors have a 15 minute window to edit their comment; Moderators can always edit. | + | |
− | ;approved=yes|no
| + | |
− | :the comment approval state; Only Moderators have access to this field.
| + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | | + | |
− | == Delete Comment ==
| + | |
− | | + | |
− | This API call is responsible for deleting a comment.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Moderators; Comment owners;
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=comment
| + | |
− | ;verb=delcomment
| + | |
− | ;commentId
| + | |
− | :The id of the comment. | + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | | + | |
− | = Forums =
| + | |
− | | + | |
− | == Add Forum ==
| + | |
− | | + | |
− | This API call is responsible for adding a forum to a site.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Administrators only.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=forum | + | |
− | ;verb=addforum
| + | |
− | ;title
| + | |
− | :the forum title; this field is used to calculate the canonical_id, if not provided. | + | |
− | | + | |
− | === Optional Parameters ===
| + | |
− | | + | |
− | ; description
| + | |
− | : the forum description.
| + | |
− | ;layout
| + | |
− | : the position of this forum relative to other forums.
| + | |
− | ;label
| + | |
− | : allows grouping of forums based on label.
| + | |
− | ;canonical_id
| + | |
− | : the nice looking identifier for human readable ids; filtering will be performed to ensure proper syntax.
| + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | ;item
| + | |
− | | + | |
− | :;forum
| + | |
− | | + | |
− | ::;id
| + | |
− | ::: the id of the newly created forum.
| + | |
− | | + | |
− | ::;canonical_id
| + | |
− | ::: the canonical_id of the newly created forum.
| + | |
− | | + | |
− | == Edit Forum ==
| + | |
− | | + | |
− | This API call is responsible for editing a forum.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Administrators only.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=forum
| + | |
− | ;verb=editforum
| + | |
− | ;forumId
| + | |
− | :the forum id. | + | |
− | | + | |
− | === Optional Parameters ===
| + | |
− | | + | |
− | ;title | + | |
− | :the forum title; this field is used to calculate the canonical_id, if not provided. | + | |
− | ; description
| + | |
− | : the forum description.
| + | |
− | ;layout
| + | |
− | : the position of this forum relative to other forums.
| + | |
− | ;label
| + | |
− | : allows grouping of forums based on label.
| + | |
− | ;canonical_id
| + | |
− | : the nice looking identifier for human readable ids; filtering will be performed to ensure proper syntax.
| + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | | + | |
− | == Delete Forum ==
| + | |
− | | + | |
− | This API call is responsible for deleting a forum and all of its threads and replies.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Administrators only.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=forum
| + | |
− | ;verb=delforum
| + | |
− | ;forumId
| + | |
− | :the forum id. | + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | | + | |
− | == Add Thread ==
| + | |
− | | + | |
− | This API call is responsible for adding a thread to a forum.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Any authenticated user.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=forum
| + | |
− | ;verb=addthread
| + | |
− | ;forumId
| + | |
− | :the forum id
| + | |
− | ;title
| + | |
− | :the thread title; this field is used to calculate the canonical_id, if no canonical_id is supplied.
| + | |
− | ; description
| + | |
− | : the thread description.
| + | |
− | | + | |
− | === Optional Parameters ===
| + | |
− | | + | |
− | ;canonical_id
| + | |
− | : the nice looking identifier for human readable ids; filtering will be performed to ensure proper syntax.
| + | |
− | | + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | ;item
| + | |
− | | + | |
− | :;thread
| + | |
− | | + | |
− | ::;id
| + | |
− | ::: the id of the newly created thread.
| + | |
− | | + | |
− | ::;canonical_id
| + | |
− | ::: the canonical_id of the newly created thread.
| + | |
− | | + | |
− | == Add Reply ==
| + | |
− | | + | |
− | This API call is responsible for adding a reply to a forum post.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Any authenticated user.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=forum
| + | |
− | ;verb=addreply
| + | |
− | ;postId
| + | |
− | :the post id; this can be either a thread id or a reply id.
| + | |
− | ; description
| + | |
− | : the reply description.
| + | |
− | | + | |
− | === Optional Parameters ===
| + | |
− | ;quote
| + | |
− | :text that you want to quote in your reply; this only applies if postId is a reply id; this is limited to 255 characters.
| + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | ;item
| + | |
− | | + | |
− | :;reply
| + | |
− | | + | |
− | ::;id
| + | |
− | ::: the id of the newly created reply.
| + | |
− | | + | |
− | == Edit Post ==
| + | |
− | | + | |
− | This API call is responsible for editing a forum post.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Superuser or user with moderator or administrator access. Post user is only able to update title and description for threads and description for replies.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=forum
| + | |
− | ;verb=editpost
| + | |
− | ;postId
| + | |
− | :the post id; this can be either a thread id or a reply id.
| + | |
− | | + | |
− | === Optional Parameters ===
| + | |
− | ; title
| + | |
− | : the post title; only applies if postId is a thread id;
| + | |
− | ; description
| + | |
− | : the post description.
| + | |
− | ;canonical_id
| + | |
− | :the canonical id of the forum post; only applies if postId is a thread id.
| + | |
− | ;forumId
| + | |
− | :the id of the forum that this post belongs to; only applies if postId is a thread id.
| + | |
− | ;sticky=yes|no
| + | |
− | :whether or not this post is sticky; only applies if postId is a thread id.
| + | |
− | ;quote
| + | |
− | :text that you want to quote in your reply; only applies if postId is a reply id; this is limited to 255 characters.
| + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
− | | + | |
− | == Delete Post ==
| + | |
− | | + | |
− | This API call is responsible for deleting a forum post.
| + | |
− | | + | |
− | === Authentication Restrictions ===
| + | |
− | | + | |
− | Administrators or Moderators; Post user is able to delete as long as post is not a thread with a reply count greater than 0.
| + | |
− | | + | |
− | === Required Parameters ===
| + | |
− | | + | |
− | ;action=forum
| + | |
− | ;verb=delpost
| + | |
− | ;postId
| + | |
− | :the post id; this can be either a thread id or a reply id.
| + | |
− | | + | |
− | === Successful Response ===
| + | |
− | | + | |
− | ;status=ok
| + | |
Below you will find links to each particular component of the Site API. Detailed API information is available by clicking on each link.