blogger.phpThis file implements the Blogger 1.0 API for posting to your blog via XML-RPC. Summary
OverviewBlogger 1.0 is an old (as blogging APIs go) and widely supported API for use with weblog clients. It allows you to add and edit blog posts as well as set and retreive certain information about your blog. Support for this API was added to LnBlog in version 0.7.0 beta 1. The Blogger 1.0 API has six methods, listed below.
Using the API with LnBlogIt is important to note that the Blogger 1.0 API is not generic. That is, it was designed specifically to work with Blogger and not for use by every weblog system on the face of the Earth. As a result, not all the methods work in exactly the same way as with Blogger. In particular, the getTemplate and setTemplate are simply not applicable to the way LnBlog works, and so they are not implemented. In addition, the newPost and editPost methods do not include any metadata, and therefore do not accomodate setting a subject or topics for the entry. To remedy this, LnBlog allows you to (optionally) start your post with subject and tag lines, as indicated in the sample post data below. Subject: Hey, it's a subject! Lastly, it should be noted that the API does not include a concept of input mode, i.e. there is no facility to set HTML, BBCode, or simple text input. Therefore, LnBlog will assume that all posts made with API calls use the default markup mode for the current blog. ConfigurationWhen configuring your blogging client to use Blogger 1.0 with LnBlog, give the URL of your LnBlog/blogger.php file as the address to handle the requests. You can use your normal LnBlog username and password as your login. For the blog ID, give the root-relative path to your blog. If you look on the index.php admin page, this is simply the text that shows up in the drop-down for upgrading your blog. When editing posts via the blogger API, the post ID is simply the URL of the directory in which the post is stored, with the protocol and domain name removed. So, if your post is at http://www.mysite.com/myblog/2006/05/04/03_2100/ then the post ID would be myblog/2006/05/04/03_2100/ Summary
blogger. newPostAdds a new post to the blog. Parameters
ReturnsA string representation of the unique ID of this post. blogger. editPostEdit an existing post. Parameters
ReturnsTrue on success. On failure, a fault is raised. blogger. getUserInfoGets the information for the given user. Parameters
ReturnsA struct containing user’s userid, firstname, lastname, nickname, email, and url. Note that not all of these necessarily apply to LnBlog, and so any field that is not found will be “faked” with a reasonable value or empty. blogger. getTemplateGets the template used for the main or entry page. This doesn’t apply to LnBlog and so always returns a “not implemented” message. Parameters
blogger. setTemplateSets the template used for the main or entry page. This doesn’t apply to LnBlog and so always returns a “not implemented” message. Parameters
|