========= cnblogs(博客园)接口和文章管理
本项目依赖于 phpxmlrpc 类库,使用前执行 composer install
即可
使用前需要将自己的 博客名地址 修改掉
// 编辑 app/Common.php 文件第28行修改,如下所示
protected static $addressName = "lantor";
web服务器访问需要配置 url rewrite 规则,入口文件为 public/index.php
,所有请求都为 HTTP POST
请求,请求方法及参数如下
Deletes a post.
string | appKey |
string | postid |
string | username |
string | password |
boolean | publish - Where applicable, this specifies whether the blog should be republished after the post has been deleted. |
boolean | Always returns true. |
Returns information on all the blogs a given user is a member.
string | appKey |
string | username |
string | password |
array of struct BlogInfo |
Updates and existing post to a designated blog using the metaWeblog API. Returns true if completed.
string | postid |
string | username |
string | password |
struct Post | post |
boolean | publish |
any |
Retrieves a list of valid categories for a post using the metaWeblog API. Returns the metaWeblog categories struct collection.
string | blogid |
string | username |
string | password |
array of struct CategoryInfo |
Retrieves an existing post using the metaWeblog API. Returns the metaWeblog struct.
string | postid |
string | username |
string | password |
struct Post |
Retrieves a list of the most recent existing post using the metaWeblog API. Returns the metaWeblog struct collection.
string | blogid |
string | username |
string | password |
integer | numberOfPosts |
array of struct Post |
Makes a new file to a designated blog using the metaWeblog API. Returns url as a string of a struct.
string | blogid |
string | username |
string | password |
struct FileData | file |
struct UrlData |
Makes a new post to a designated blog using the metaWeblog API. Returns postid as a string.
string | blogid |
string | username |
string | password |
struct Post | post |
boolean | publish |
string |
Create a new category
string | blog_id |
string | username |
string | password |
struct WpCategory | category |
integer |
string | blogid |
string | url |
string | blogName |
dateTime | dateCreated - Required when posting. |
string | description - Required when posting. |
string | title - Required when posting. |
array of string | categories (optional) |
struct Enclosure | enclosure (optional) |
string | link (optional) |
string | permalink (optional) |
any | postid (optional) |
struct Source | source (optional) |
string | userid (optional) |
any | mt_allow_comments (optional) |
any | mt_allow_pings (optional) |
any | mt_convert_breaks (optional) |
string | mt_text_more (optional) |
string | mt_excerpt (optional) |
string | mt_keywords (optional) |
string | wp_slug (optional) |
string | description |
string | htmlUrl |
string | rssUrl |
string | title |
string | categoryid |
base64 | bits |
string | name |
string | type |
string | url |
string | name |
string | slug (optional) |
integer | parent_id |
string | description (optional) |
integer | length (optional) |
string | type (optional) |
string | url (optional) |
string | name (optional) |
string | url (optional) |