Class WordpressClientImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deleteMedia​(java.lang.String id)  
      void deletePost​(java.lang.String id)  
      java.util.List<Media> getAllMedia​(java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)  
      java.util.List<Post> getAllPosts​(java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)  
      Media getMedia​(java.lang.String id)  
      PagedResponse<Media> getMedias​(java.lang.Integer page, java.lang.Integer perPage, java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)  
      Post getPost​(java.lang.String id)  
      PagedResponse<Post> getPosts​(java.lang.Integer page, java.lang.Integer perPage, java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)  
      Post savePost​(Post post)  
      Media updateMedia​(Media media)  
      Media uploadMedia​(java.io.File content, org.apache.hc.core5.http.ContentType contentType, java.lang.String filename)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WordpressClientImpl

        public WordpressClientImpl​(Config config,
                                   AuthenticationProvider authenticationProvider)
                            throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getAllPosts

        public java.util.List<Post> getAllPosts​(java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)
                                         throws java.io.IOException,
                                                java.net.URISyntaxException
        Specified by:
        getAllPosts in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • getPosts

        public PagedResponse<Post> getPosts​(java.lang.Integer page,
                                            java.lang.Integer perPage,
                                            java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)
                                     throws java.io.IOException,
                                            java.net.URISyntaxException
        Specified by:
        getPosts in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • getPost

        public Post getPost​(java.lang.String id)
                     throws java.io.IOException,
                            java.net.URISyntaxException
        Specified by:
        getPost in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • savePost

        public Post savePost​(Post post)
                      throws java.io.IOException,
                             java.net.URISyntaxException
        Specified by:
        savePost in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • deletePost

        public void deletePost​(java.lang.String id)
                        throws java.io.IOException,
                               java.net.URISyntaxException
        Specified by:
        deletePost in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • getAllMedia

        public java.util.List<Media> getAllMedia​(java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)
                                          throws java.io.IOException,
                                                 java.net.URISyntaxException
        Specified by:
        getAllMedia in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • getMedias

        public PagedResponse<Media> getMedias​(java.lang.Integer page,
                                              java.lang.Integer perPage,
                                              java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> queryParams)
                                       throws java.io.IOException,
                                              java.net.URISyntaxException
        Specified by:
        getMedias in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • getMedia

        public Media getMedia​(java.lang.String id)
                       throws java.io.IOException,
                              java.net.URISyntaxException
        Specified by:
        getMedia in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • uploadMedia

        public Media uploadMedia​(java.io.File content,
                                 org.apache.hc.core5.http.ContentType contentType,
                                 java.lang.String filename)
                          throws java.io.IOException,
                                 java.net.URISyntaxException
        Specified by:
        uploadMedia in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • updateMedia

        public Media updateMedia​(Media media)
                          throws java.io.IOException,
                                 java.net.URISyntaxException
        Specified by:
        updateMedia in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException
      • deleteMedia

        public void deleteMedia​(java.lang.String id)
                         throws java.io.IOException,
                                java.net.URISyntaxException
        Specified by:
        deleteMedia in interface WordpressClient
        Throws:
        java.io.IOException
        java.net.URISyntaxException