Change-Id: I7b15bd2c567369d08fc86cb8a85539326dae38d4
This commit is contained in:
rui.zhang 2019-01-08 14:35:04 +08:00
parent e618267db3
commit 32e731e068

View File

@ -24,6 +24,20 @@ public final class WordPress {
}
}
public WordPress(String xmlRpcUrl, String username, String password) {
try {
WPConfig config = new WPConfigBuilder()
.xmlRpcUrl(xmlRpcUrl)
.username(username)
.password(password)
.trustAll(true)
.build();
client = new WPClient(config);
} catch (Exception e) {
throw new WPClientException("Error in creating wp client.", e);
}
}
public UserBlog getUserBlog() {
List<UserBlog> list = getUsersBlogs();