Change-Id: Ifda89cf89d7e371956ccb6529daec5aac276f63d
This commit is contained in:
rui.zhang
2018-12-19 23:40:16 +08:00
parent f7466f84ab
commit e3179d0e47
5 changed files with 55 additions and 101 deletions
+23 -2
View File
@@ -1,2 +1,23 @@
# wordpress-client
WordPress Java client
# 简介
WordPress Client是一个Java版的WordPress客户端操作库, 主要基于[WordPress XML-RPC API](https://codex.wordpress.org/XML-RPC_WordPress_API)实现。目前WordPress Client提供了如下能力:
* 获取WordPress用户信息
* 获取博客文章信息
* 发布文章到WordPress部署的博客
* 对已发布的文章进行编辑、删除等操作
# 使用
## 创建WordPress操作实例
## 获取作者信息
## 新增文章
## 获取文章
## 编辑文章
## 删除文章
#
+28 -82
View File
@@ -4,6 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<groupId>org.chobit.wp</groupId>
<artifactId>wordpress-client</artifactId>
<version>0.1-SNAPSHOT</version>
@@ -17,13 +23,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<dependencies>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
@@ -54,20 +53,6 @@
</dependency>
</dependencies>
<scm>
<connection>scm:git:https://github.com/zhyea/wordpress-client.git</connection>
<developerConnection>scm:git:https://github.com/zhyea/wordpress-client.git</developerConnection>
<url>https://github.com/zhyea/wordpress-client</url>
</scm>
<developers>
<developer>
<name>robin</name>
<email>robin@zhyea.com</email>
<url>http://www.zhyea.com</url>
</developer>
</developers>
<build>
<plugins>
<plugin>
@@ -82,66 +67,27 @@
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- GPG -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>oss</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>oss</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<tag>master</tag>
<connection>scm:git:https://github.com/zhyea/wordpress-client.git</connection>
<developerConnection>scm:git:https://github.com/zhyea/wordpress-client.git</developerConnection>
<url>https://github.com/zhyea/wordpress-client</url>
</scm>
<developers>
<developer>
<name>robin</name>
<email>robin@zhyea.com</email>
<url>http://www.zhyea.com</url>
</developer>
</developers>
</project>
@@ -1,5 +1,6 @@
package org.chobit.wp;
import org.junit.Ignore;
import org.junit.Test;
import static org.chobit.wp.Config.*;
@@ -7,6 +8,7 @@ import static org.chobit.wp.Config.*;
/**
* @author robin
*/
@Ignore
public class ConfigTest {
@Test
-17
View File
@@ -1,17 +0,0 @@
package org.chobit.wp;
import org.chobit.wp.model.request.PostRequest;
import java.io.IOException;
/**
* @author robin
*/
public class Test {
public static void main(String[] args) throws IOException {
PostRequest request = new PostRequest();
request.setPostAuthor(11);
System.out.println(request.toMap());
}
}
@@ -7,6 +7,7 @@ import org.chobit.wp.model.response.Author;
import org.chobit.wp.model.response.Post;
import org.chobit.wp.model.response.UserBlog;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import java.util.List;
@@ -17,6 +18,7 @@ import static org.chobit.wp.tools.JsonKit.toJson;
/**
* @author robin
*/
@Ignore
public class WordPressTest {
private WordPress wp = new WordPress(buildConfig());