Packagecom.absentdesign.core.webapis.wordpress.methodgroups
Classpublic class Posts
InheritancePosts Inheritance WPMethodGroup Inheritance MethodGroup Inheritance flash.events.EventDispatcher

concrete WPMethodGroup for manipulating Posts



Public Properties
 PropertyDefined by
 InheritedblogId : int
WPMethodGroup
 Inheritedpassword : String
WPMethodGroup
 Inheritedusername : String
WPMethodGroup
Protected Properties
 PropertyDefined by
 Inheritedhelper : MethodGroupHelper
MethodGroup
 InheritedrequestArgs : Array
WPMethodGroup
 InheritedrequestFunction : Function
WPMethodGroup
 Inheritedservice : Service
MethodGroup
Public Methods
 MethodDefined by
  
Posts(service:WPService)
Posts
  
editPost(postId:int, post:Post, publish:Boolean):void
Wrapper for metaWeblog.editPost - edit a specific post

Will dispatch a ServiceEvent of type WPServiceEvent.EDIT_POST with a struct as the WPServiceEvent.data once loaded

Posts
  
getPost(postId:int):void
Wrapper for metaWeblog.getPost - gets a single post

Will dispatch a ServiceEvent of type WPServiceEvent.GET_POST with a Post as the WPServiceEvent.data once loaded

Posts
  
getRecentPosts(count:uint = 10):void
Wrapper for metaWeblog.getRecentPosts - gets an array of recent posts

Will dispatch a ServiceEvent of type WPServiceEvent.GET_RECENT_POSTS with an Array of posts as the WPServiceEvent.data once loaded

Posts
  
getRecentPostTitles(numberOfPosts:uint = 10):void
Wrapper for mt.getRecentPostTitles - gets a bandwidth friendly an array of recent posts

Will dispatch a ServiceEvent of type WPServiceEvent.GET_RECENT_POST_TITLES with an Array of Posts as the WPServiceEvent.data once loaded

Posts
 Inherited
load(request:ServiceRequest):void
MethodGroup
 Inherited
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
  
newPost(content:Post, publish:Boolean):void
Wrapper for metaWeblog.newPost - add a new Post

Will dispatch a ServiceEvent of type WPServiceEvent.NEW_POST once loaded

Posts
Protected Methods
 MethodDefined by
 Inherited
processAndDispatch(event:Event):void
Process the result using WPMethodGroupHelper and dispatch a ServiceEvent of type request.eventType with the parsed data
WPMethodGroup
 Inherited
Re-submits a delayed call if the service needed to connect or was connecting while the call was made
WPMethodGroup
Constructor detail
Posts()constructor
public function Posts(service:WPService)Parameters
service:WPService
Method detail
editPost()method
public function editPost(postId:int, post:Post, publish:Boolean):void

Wrapper for metaWeblog.editPost - edit a specific post

Will dispatch a ServiceEvent of type WPServiceEvent.EDIT_POST with a struct as the WPServiceEvent.data once loaded

Parameters
postId:int — the id of the post to edit
 
post:Post — the new post data
 
publish:Boolean — whether to publish immediately or save as a draft
getPost()method 
public function getPost(postId:int):void

Wrapper for metaWeblog.getPost - gets a single post

Will dispatch a ServiceEvent of type WPServiceEvent.GET_POST with a Post as the WPServiceEvent.data once loaded

Parameters
postId:int — The id of the post to retreive
getRecentPosts()method 
public function getRecentPosts(count:uint = 10):void

Wrapper for metaWeblog.getRecentPosts - gets an array of recent posts

Will dispatch a ServiceEvent of type WPServiceEvent.GET_RECENT_POSTS with an Array of posts as the WPServiceEvent.data once loaded

Parameters
count:uint (default = 10) — The number of posts to retreive. If you want all posts just use a really high number (999999)
getRecentPostTitles()method 
public function getRecentPostTitles(numberOfPosts:uint = 10):void

Wrapper for mt.getRecentPostTitles - gets a bandwidth friendly an array of recent posts

Will dispatch a ServiceEvent of type WPServiceEvent.GET_RECENT_POST_TITLES with an Array of Posts as the WPServiceEvent.data once loaded

Parameters
numberOfPosts:uint (default = 10) — The number of posts to retreive. If you want all weblog posts just use a really high number (999999)
newPost()method 
public function newPost(content:Post, publish:Boolean):void

Wrapper for metaWeblog.newPost - add a new Post

Will dispatch a ServiceEvent of type WPServiceEvent.NEW_POST once loaded

Parameters
content:Post — the new Post
 
publish:Boolean — whether to publish immediately or save as a draft