| Package | com.absentdesign.core.webapis.wordpress.methodgroups |
| Class | public class Comments |
| Inheritance | Comments WPMethodGroup MethodGroup flash.events.EventDispatcher |
| Method | Defined by | ||
|---|---|---|---|
| Comments | |||
|
deleteComment(commentId:int):void
Wrapper for wp.deleteComment - delete a comment
Will dispatch a ServiceEvent of type WPServiceEvent.DELETE_COMMENT with a struct as the WPServiceEvent.data once loaded | Comments | ||
|
editComment(commentId:int, comment:Comment):void
Wrapper for wp.editComment - edit an existing comment
Will dispatch a ServiceEvent of type WPServiceEvent.EDIT_COMMENT with a struct as the WPServiceEvent.data once loaded | Comments | ||
|
getComment(commentId:int):void
Wrapper for wp.getComment - gets an individual comment
Will dispatch a ServiceEvent of type WPServiceEvent.GET_COMMENT with a Comment as the WPServiceEvent.data once loaded | Comments | ||
|
getComments(postId:int, status:String = "", offset:int = 0, number:int = 10):void
Wrapper for wp.getComments - gets a list of comments for a specific post
Will dispatch a ServiceEvent of type WPServiceEvent.GET_COMMENTS with an array of Comments as the WPServiceEvent.data once loaded | Comments | ||
![]() |
load(request:ServiceRequest):void
| MethodGroup | |
![]() |
loadRequest(request:WPServiceRequest, requestFunction:Function, ... args):void
Load a WPServiceRequest
Automatically calls service.connect() and delays the request until the service is connected if the WPService does not return a valid blogId | WPMethodGroup | |
|
newComment(postId:int, comment:Comment):void
Wrapper for wp.newComment - create a new comment
Will dispatch a ServiceEvent of type WPServiceEvent.NEW_COMMENT with a struct as the WPServiceEvent.data once loaded wp.newComment only seems to be able to add comments authored by the logged in user as per the
username/password on | Comments | ||
| Comments | () | constructor |
| deleteComment | () | method |
public function deleteComment(commentId:int):voidWrapper for wp.deleteComment - delete a comment
Will dispatch a ServiceEvent of type WPServiceEvent.DELETE_COMMENT with a struct as the WPServiceEvent.data once loaded
ParameterscommentId:int — the id the comment
|
| editComment | () | method |
public function editComment(commentId:int, comment:Comment):voidWrapper for wp.editComment - edit an existing comment
Will dispatch a ServiceEvent of type WPServiceEvent.EDIT_COMMENT with a struct as the WPServiceEvent.data once loaded
ParameterscommentId:int — the id the comment
|
|
comment:Comment — the replacement comment
|
| getComment | () | method |
public function getComment(commentId:int):voidWrapper for wp.getComment - gets an individual comment
Will dispatch a ServiceEvent of type WPServiceEvent.GET_COMMENT with a Comment as the WPServiceEvent.data once loaded
ParameterscommentId:int — the id the comment
|
| getComments | () | method |
public function getComments(postId:int, status:String = "", offset:int = 0, number:int = 10):voidWrapper for wp.getComments - gets a list of comments for a specific post
Will dispatch a ServiceEvent of type WPServiceEvent.GET_COMMENTS with an array of Comments as the WPServiceEvent.data once loaded
ParameterspostId:int — the id of the post to edit
|
|
status:String (default = "") — a status string from CommentStatusList
|
|
offset:int (default = 0) |
|
number:int (default = 10) — the number of comments to get
|
| newComment | () | method |
public function newComment(postId:int, comment:Comment):voidWrapper for wp.newComment - create a new comment
Will dispatch a ServiceEvent of type WPServiceEvent.NEW_COMMENT with a struct as the WPServiceEvent.data once loaded
wp.newComment only seems to be able to add comments authored by the logged in user as per the
username/password on service), and will ignore any author info on comment
You can, however use editComment to change the author details on a comment, regardless of the
logged in user
postId:int — the id of the post to add the comment to
|
|
comment:Comment — the new comment
|