| java.lang.Object org.blojsom.extension.xmlrpc.handler.APIHandler org.blojsom.extension.xmlrpc.handler.MetaWeblogAPIHandler
MetaWeblogAPIHandler | public class MetaWeblogAPIHandler extends APIHandler (Code) | | MetaWeblogAPIHandler
author: David Czarnecki since: blojsom 3.0 version: $Id: MetaWeblogAPIHandler.java,v 1.7 2007/01/17 02:35:07 czarneckid Exp $ |
Method Summary | |
public boolean | deletePost(String appkey, String postid, String userid, String password, boolean publish) | public boolean | editPost(String postid, String userid, String password, Hashtable struct, boolean publish) Edits a given post. | public Object | getCategories(String blogid, String userid, String password) | public String | getName() | public Object | getPost(String postid, String userid, String password) | public Object | getRecentPosts(String blogid, String userid, String password, int numberOfPosts) | public String | getTemplate(String appkey, String blogid, String userid, String password, String templateType) Returns the main or archive index template of a given blog (NOT IMPLEMENTED)
Parameters: appkey - Unique identifier/passcode of the application sending the post Parameters: blogid - Unique identifier of the blog the post will be added to Parameters: userid - Login for a Blogger user who has permission to post to the blog Parameters: password - Password for said username Parameters: templateType - Determines which of the blog's templates will be returned. | public Object | getUsersBlogs(String appkey, String userid, String password) | public Object | newMediaObject(String blogid, String userid, String password, Hashtable struct) | public String | newPost(String blogid, String userid, String password, Hashtable struct, boolean publish) Makes a new post to a designated blog. | public void | setBlog(Blog blog) | public boolean | setTemplate(String appkey, String blogid, String userid, String password, String template, String templateType) Edits the main or archive index template of a given blog (NOT IMPLEMENTED)
Parameters: appkey - Unique identifier/passcode of the application sending the post Parameters: blogid - Unique identifier of the blog the post will be added to Parameters: userid - Login for a Blogger user who has permission to post to the blog Parameters: password - Password for said username Parameters: template - The text for the new template (usually mostly HTML). |
MetaWeblogAPIHandler | public MetaWeblogAPIHandler()(Code) | | Create a new instance of the MetaWeblog API handler
|
deletePost | public boolean deletePost(String appkey, String postid, String userid, String password, boolean publish) throws Exception(Code) | | Delete a Post
Parameters: appkey - Unique identifier/passcode of the application sending the post Parameters: postid - Unique identifier of the post to be changed Parameters: userid - Login for a Blogger user who has permission to post to the blog Parameters: password - Password for said username Parameters: publish - Ignored true if the entry was delete, false otherwise throws: XmlRpcException - |
editPost | public boolean editPost(String postid, String userid, String password, Hashtable struct, boolean publish) throws Exception(Code) | | Edits a given post. Optionally, will publish the blog after making the edit
Parameters: postid - Unique identifier of the post to be changed Parameters: userid - Login for a MetaWeblog user who has permission to post to the blog Parameters: password - Password for said username Parameters: struct - Contents of the post Parameters: publish - If true, the blog will be published immediately after the post is made true if the entry was edited, false otherwise throws: XmlRpcException - If the user was not authenticated correctly, if there was an I/O exception,or if the entry permalink ID is invalid |
getCategories | public Object getCategories(String blogid, String userid, String password) throws Exception(Code) | | Authenticates a user and returns the categories available in the blojsom
Parameters: blogid - Dummy Value for Blojsom Parameters: userid - Login for a MetaWeblog user who has permission to post to the blog Parameters: password - Password for said username Blog category list throws: XmlRpcException - If there are no categories or the user was not authenticated correctly |
getName | public String getName()(Code) | | Retrieve the API handler name
API handler name "metaWeblog" |
getPost | public Object getPost(String postid, String userid, String password) throws Exception(Code) | | Retrieves a given post from the blog
Parameters: postid - Unique identifier of the post to be changed Parameters: userid - Login for a MetaWeblog user who has permission to post to the blog Parameters: password - Password for said username Structure containing the minimal attributes for the MetaWeblog API getPost() method: title, link, and description throws: XmlRpcException - If the user was not authenticated correctly, if there was an I/O exception,or if the entry permalink ID is invalid |
getRecentPosts | public Object getRecentPosts(String blogid, String userid, String password, int numberOfPosts) throws Exception(Code) | | Retrieves a set of recent posts to the blog
Parameters: blogid - Unique identifier of the blog the post will be added to Parameters: userid - Login for a MetaWeblog user who has permission to post to the blog Parameters: password - Password for said username Parameters: numberOfPosts - Number of posts to be retrieved from the blog Array of structures containing the minimal attributes for the MetaWeblog API getPost() method: title, link, and description throws: Exception - If the user was not authenticated correctly |
getTemplate | public String getTemplate(String appkey, String blogid, String userid, String password, String templateType) throws Exception(Code) | | Returns the main or archive index template of a given blog (NOT IMPLEMENTED)
Parameters: appkey - Unique identifier/passcode of the application sending the post Parameters: blogid - Unique identifier of the blog the post will be added to Parameters: userid - Login for a Blogger user who has permission to post to the blog Parameters: password - Password for said username Parameters: templateType - Determines which of the blog's templates will be returned. Currently, either "main" or "archiveIndex" throws: XmlRpcException - |
getUsersBlogs | public Object getUsersBlogs(String appkey, String userid, String password) throws Exception(Code) | | Returns information on all the blogs a given user is a member of
Parameters: appkey - Unique identifier/passcode of the application sending the post Parameters: userid - Login for a Blogger user who has permission to post to the blog Parameters: password - Password for said username Blog category list throws: XmlRpcException - If there are no categories or the user was not authenticated correctly |
newMediaObject | public Object newMediaObject(String blogid, String userid, String password, Hashtable struct) throws Exception(Code) | | Uploads an object to the blog to a specified directory
Parameters: blogid - Unique identifier of the blog the post will be added to Parameters: userid - Login for a MetaWeblog user who has permission to post to the blog Parameters: password - Password for said username Parameters: struct - Upload structure defined by the MetaWeblog API Structure containing a link to the uploaded media object throws: XmlRpcException - If the user was not authenticated correctly, if there was an I/O exception,or if the MIME type of the upload object is not accepted |
newPost | public String newPost(String blogid, String userid, String password, Hashtable struct, boolean publish) throws Exception(Code) | | Makes a new post to a designated blog. Optionally, will publish the blog after making the post
Parameters: blogid - Unique identifier of the blog the post will be added to Parameters: userid - Login for a MetaWeblog user who has permission to post to the blog Parameters: password - Password for said username Parameters: struct - Contents of the post Parameters: publish - If true, the blog will be published immediately after the post is made Post ID of the added entry throws: XmlRpcException - If the user was not authenticated correctly or if there was an I/O exception |
setTemplate | public boolean setTemplate(String appkey, String blogid, String userid, String password, String template, String templateType) throws Exception(Code) | | Edits the main or archive index template of a given blog (NOT IMPLEMENTED)
Parameters: appkey - Unique identifier/passcode of the application sending the post Parameters: blogid - Unique identifier of the blog the post will be added to Parameters: userid - Login for a Blogger user who has permission to post to the blog Parameters: password - Password for said username Parameters: template - The text for the new template (usually mostly HTML). Must contain opening and closing tags, since they're needed to publish Parameters: templateType - Determines which of the blog's templates will be returned. Currently, either "main" or "archiveIndex" throws: XmlRpcException - |
|
|