DTWordpress Class Reference
Inherits from | DTXMLRPCService : NSObject |
Declared in | DTWordpress.h |
Overview
Wrapper around methods for communicating with a Wordpress XML-RPC service.
After creating the wordpress service with an endpoint, set the userName and password. Completion handlers have an error parameter. If this is non-nil then you can use this to display an error message.
Properties
Instance Methods
getCategoriesWithCompletion:
Retrieve list of categories.
- (void)getCategoriesWithCompletion:(void ( ^ ) ( NSArray *categories , NSError *error ))completion
Parameters
- completion
The completion handler when the request is finished
Declared In
DTWordpress.h
getPostWithIdentifier:completion:
Returns one blog post
- (void)getPostWithIdentifier:(NSUInteger)identifier completion:(void ( ^ ) ( NSDictionary *content , NSError *error ))completion
Parameters
- identifier
The post number of the post to be retrieved
- completion
The completion handler when the request is finished
Declared In
DTWordpress.h
getUsersBlogsWithCompletion:
Returns information about all the blogs a given user is a member of.
- (void)getUsersBlogsWithCompletion:(void ( ^ ) ( NSArray *blogs , NSError *error ))completion
Parameters
- completion
The completion handler when the request is finished
Declared In
DTWordpress.h
newMediaObjectWithFileName:contentType:data:shouldOverwrite:completion:
Creates a new media item
- (void)newMediaObjectWithFileName:(NSString *)fileName contentType:(NSString *)contentType data:(NSData *)data shouldOverwrite:(BOOL)shouldOverwrite completion:(void ( ^ ) ( NSInteger mediaID , NSURL *mediaURL , NSError *error ))completion
Parameters
- fileName
The file name of the media item
- contentType
The MIME content type of the data
- data
The data of the media item
- shouldOverwrite
Set to
YES
to overwrite an item of the same name if it already exists
- completion
The completion handler when the request is finished
Declared In
DTWordpress.h
newPostWithContent:shouldPublish:completion:
Creates a new blog post
- (void)newPostWithContent:(NSDictionary *)content shouldPublish:(BOOL)shouldPublish completion:(void ( ^ ) ( NSInteger postID , NSError *error ))completion
Parameters
- content
The content dictionary for the new post
- shouldPublish
Set to
YES
if the blog post should be published,NO
to set it as draft.
- completion
The completion handler when the request is finished
Declared In
DTWordpress.h