| Modifier and Type | Field and Description |
|---|---|
String |
baseUrl |
CATEGORIES, CATEGORY, TAG, TAGS| Constructor and Description |
|---|
Client(String baseUrl,
String username,
String password,
boolean debug) |
Client(String baseUrl,
String username,
String password,
boolean debug,
org.springframework.http.client.ClientHttpRequestFactory requestFactory) |
public final String baseUrl
public Post createPost(Map<String,Object> postFields, PostStatus status) throws PostCreateException
createPost in interface PostspostFields - Map<String, Object>PostPostCreateException
status - Post status of the post:
* draft,
* publish,
* pending,
* future,
* private
or any custom registered status.
If providing a status of future, you must specify a date in order for the post to be published as expected.
Default is draft. (string) optional
public Post createPost(Post post, PostStatus status) throws PostCreateException
createPost in interface PostsPostCreateExceptionpublic Post getPost(Long id) throws PostNotFoundException
getPost in interface PostsPostNotFoundExceptionpublic Post getPost(Long id, String context) throws PostNotFoundException
getPost in interface PostsPostNotFoundExceptionpublic Post updatePost(Post post)
Posts
PUT /post/{id}
updatePost in interface Postspublic Post updatePostField(Long postId, String field, Object value)
updatePostField in interface Postspublic Post deletePost(Post post)
deletePost in interface Postspublic <T> PagedResponse<T> search(SearchRequest<T> search)
public Media createMedia(Media media, org.springframework.core.io.Resource resource) throws WpApiParsedException
createMedia in interface MediasWpApiParsedExceptionpublic Post setPostFeaturedImage(Long postId, Media media)
setPostFeaturedImage in interface Mediaspublic List<Media> getPostMedias(Long postId)
getPostMedias in interface Mediaspublic Media updateMedia(Media media)
updateMedia in interface Mediaspublic boolean deleteMedia(Media media, boolean force)
deleteMedia in interface Mediaspublic boolean deleteMedia(Media media)
deleteMedia in interface Mediaspublic PostMeta createMeta(Long postId, String key, String value)
createMeta in interface PostMetaspublic List<PostMeta> getPostMetas(Long postId)
getPostMetas in interface PostMetaspublic PostMeta getPostMeta(Long postId, Long metaId)
getPostMeta in interface PostMetaspublic PostMeta updatePostMetaValue(Long postId, Long metaId, String value)
updatePostMetaValue in interface PostMetaspublic PostMeta updatePostMeta(Long postId, Long metaId, String key, String value)
updatePostMeta in interface PostMetaspublic boolean deletePostMeta(Long postId, Long metaId)
deletePostMeta in interface PostMetaspublic boolean deletePostMeta(Long postId, Long metaId, boolean force)
deletePostMeta in interface PostMetaspublic List<Taxonomy> getTaxonomies()
getTaxonomies in interface Taxonomiespublic Taxonomy getTaxonomy(String slug)
getTaxonomy in interface Taxonomiespublic Term getTerm(String taxonomy, Long id) throws TermNotFoundException
getTerm in interface TermsTermNotFoundExceptionpublic Term updateTerm(String taxonomy, Term term)
updateTerm in interface Termspublic Term deleteTerm(String taxonomy, Term term) throws TermNotFoundException
deleteTerm in interface TermsTermNotFoundExceptionpublic List<Term> deleteTerms(String taxonomy, Term... terms)
deleteTerms in interface Termspublic Term createTag(Term tagTerm) throws WpApiParsedException
createTag in interface TagsWpApiParsedExceptionpublic Term getTag(Long id) throws TermNotFoundException
getTag in interface TagsTermNotFoundExceptionpublic Term deleteTag(Term tagTerm) throws TermNotFoundException
Tags?force=true. If tag trashing is not supported,
an exception will be thrown.deleteTag in interface TagsTermNotFoundExceptionpublic Term deleteTag(Term tagTerm, boolean force) throws TermNotFoundException
deleteTag in interface TagsTermNotFoundExceptionpublic Term createPostTag(Post post, Term tag) throws WpApiParsedException
createPostTag in interface TagsWpApiParsedExceptionpublic List<Term> getPostTags(Post post)
getPostTags in interface Tagspublic Term deletePostTag(Post post, Term tagTerm, boolean force) throws TermNotFoundException
deletePostTag in interface TagsTermNotFoundExceptionpublic Term getPostTag(Post post, Term tagTerm) throws TermNotFoundException
getPostTag in interface TagsTermNotFoundExceptionpublic Term getCategory(Long id)
getCategory in interface Categoriespublic List<Term> getCategories()
getCategories in interface Categoriespublic Term createCategory(Term categoryTerm)
createCategory in interface Categoriespublic Term deleteCategory(Term categoryTerm) throws TermNotFoundException
deleteCategory in interface CategoriesTermNotFoundExceptionpublic Term deleteCategory(Term categoryTerm, boolean force) throws TermNotFoundException
deleteCategory in interface CategoriesTermNotFoundExceptionpublic List<Term> deleteCategories(Term... terms)
deleteCategories in interface Categoriespublic List<Term> deleteCategories(boolean force, Term... terms)
deleteCategories in interface Categoriespublic Page createPage(Page page, PostStatus status)
createPage in interface Pagespublic Page getPage(Long pageId) throws PageNotFoundException
getPage in interface PagesPageNotFoundExceptionpublic Page updatePage(Page page)
updatePage in interface Pagespublic Page deletePage(Page page)
deletePage in interface Pagespublic Page deletePage(Page page, boolean force)
deletePage in interface Pagespublic User createUser(User user, String username, String password) throws WpApiParsedException
createUser in interface UsersWpApiParsedExceptionpublic User getUser(long userId) throws UserNotFoundException
getUser in interface UsersUserNotFoundExceptionpublic User getUser(long userId, String context) throws UserNotFoundException
getUser in interface UsersUserNotFoundExceptionpublic User deleteUser(User user)
deleteUser in interface Userspublic User updateUser(User user)
updateUser in interface Userspublic <T> PagedResponse<T> getPagedResponse(String context, Class<T> typeRef, String... expandParams)
getPagedResponse in interface Wordpresspublic <T> PagedResponse<T> getPagedResponse(URI uri, Class<T> typeRef)
getPagedResponse in interface Wordpresspublic <T> PagedResponse<T> traverse(PagedResponse<T> response, Function<PagedResponse<?>,String> direction)
Copyright © 2016. All rights reserved.