Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
letrunghieu committed Jun 20, 2014
1 parent 641d4d7 commit 01b8024
Showing 1 changed file with 54 additions and 26 deletions.
80 changes: 54 additions & 26 deletions src/WordpressClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class WordpressClient
* Create a new client with credentials
*
* @param string $xmlrpcEndPoint The wordpress XML-RPC endpoint
* @param string $username The client's username
* @param string $password The client's password
* @param string $username The client's username
* @param string $password The client's password
* @param \Illuminate\Log\Writer $logger
*/
public function __construct($xmlrpcEndPoint, $username, $password, Writer $logger = null)
Expand Down Expand Up @@ -137,8 +137,9 @@ function getAuth()
/**
* Retrieve a post of any registered post type.
*
* @param integer $postId post id The id of selected post
* @param array $fields Optional. List of field or meta-field names to include in response.
* @param integer $postId the id of selected post
* @param array $fields (optional) list of field or meta-field names to include in response.
*
* @return array
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.getPosts
*/
Expand All @@ -158,8 +159,9 @@ function getPost($postId, array $fields = array())
/**
* Retrieve list of posts of any registered post type.
*
* @param array $filters Optional
* @param array $fields Optional
* @param array $filters optional
* @param array $fields optional
*
* @return array array of struct
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.getPosts
*/
Expand All @@ -176,11 +178,12 @@ function getPosts(array $filters = array(), array $fields = array())
/**
* Create a new post of any registered post type.
*
* @param string $title the post title
* @param string $body the post body
* @param array $categorieIds the list of category ids
* @param integer $thumbnailId the thumbnail id
* @param array $content the content array, see more at wordpress documentation
* @param string $title the post title
* @param string $body the post body
* @param array $categorieIds the list of category ids
* @param integer $thumbnailId the thumbnail id
* @param array $content the content array, see more at wordpress documentation
*
* @return integer the new post id
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.newPost
Expand All @@ -202,12 +205,13 @@ function newPost($title, $body, array $content = array())
/**
* Edit an existing post of any registered post type.
*
* @param integer $postId the id of selected post
* @param string $title the new title
* @param string $body the new body
* @param array $categorieIds the new list of category ids
* @param integer $thumbnailId the new thumbnail id
* @param array $content the advanced array
* @param integer $postId the id of selected post
* @param string $title the new title
* @param string $body the new body
* @param array $categorieIds the new list of category ids
* @param integer $thumbnailId the new thumbnail id
* @param array $content the advanced array
*
* @return boolean
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.editPost
Expand All @@ -221,7 +225,8 @@ function editPost($postId, array $content)
/**
* Delete an existing post of any registered post type.
*
* @param integer $postId the id of selected post
* @param integer $postId the id of selected post
*
* @return boolean
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.deletePost
Expand All @@ -236,7 +241,8 @@ function deletePost($postId)
* Retrieve a registered post type.
*
* @param string $postTypeName the post type name
* @param array $fields Optional. List of field or meta-field names to include in response.
* @param array $fields (optional) list of field or meta-field names to include in response.
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.getPostType
Expand All @@ -252,6 +258,7 @@ function getPostType($postTypeName, array $fields = array())
*
* @param array $filter
* @param array $fields
*
* @return array list of struct
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.getPostTypes
Expand Down Expand Up @@ -292,6 +299,7 @@ function getPostStatusList()
* Retrieve information about a taxonomy.
*
* @param string $taxonomy the name of the selected taxonomy
*
* @return array taxonomy information
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Taxonomies#wp.getTaxonomy
Expand Down Expand Up @@ -319,7 +327,8 @@ function getTaxonomies()
* Retrieve a taxonomy term.
*
* @param integer $termId
* @param string $taxonomy
* @param string $taxonomy
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Taxonomies#wp.getTerm
Expand All @@ -334,7 +343,8 @@ function getTerm($termId, $taxonomy)
* Retrieve list of terms in a taxonomy.
*
* @param string $taxonomy
* @param array $filter
* @param array $filter
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Taxonomies#wp.getTerms
Expand All @@ -353,6 +363,7 @@ function getTerms($taxonomy, array $filter = array())
* @param string $slug
* @param string $description
* @param integer $parentId
*
* @return integer new term id
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Taxonomies#wp.newTerm
Expand Down Expand Up @@ -385,6 +396,7 @@ function newTerm($name, $taxomony, $slug = null, $description = null, $parentId
* @param integer $termId
* @param string $taxonomy
* @param array $content
*
* @return boolean
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Taxonomies#wp.editTerm
Expand All @@ -401,6 +413,7 @@ function editTerm($termId, $taxonomy, array $content = array())
*
* @param integer $termId
* @param string $taxonomy
*
* @return boolean
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Taxonomies#wp.deleteTerm
Expand All @@ -415,6 +428,7 @@ function deleteTerm($termId, $taxonomy)
* Retrieve a media item (i.e, attachment).
*
* @param integer $itemId
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Media#wp.getMediaItem
Expand All @@ -429,6 +443,7 @@ function getMediaItem($itemId)
* Retrieve list of media items.
*
* @param array $filter
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Media#wp.getMediaLibrary
Expand All @@ -442,9 +457,12 @@ function getMediaLibrary(array $filter = array())
/**
* Upload a media file.
*
* @param string $name
* @param string $mime
* @param string $bits Binary data (no encoded)
* @param string $name file name
* @param string $mime file mime type
* @param string $bits binary data (no encoded)
* @param boolean $overwrite (optional)
* @param int $postId (optional)
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Media#wp.uploadFile
Expand Down Expand Up @@ -473,6 +491,7 @@ function uploadFile($name, $mime, $bits, $overwrite = null, $postId = null)
* Retrieve comment count for a specific post.
*
* @param integer $postId
*
* @return integer
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Comments#wp.getCommentCount
Expand Down Expand Up @@ -501,6 +520,7 @@ function getComment($commentId)
* Retrieve list of comments.
*
* @param array $filter
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Comments#wp.getComments
Expand All @@ -515,7 +535,8 @@ function getComments(array $filter = array())
* Create a new comment.
*
* @param integer $post_id
* @param array $comment
* @param array $comment
*
* @return integer new comment_id
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Comments#wp.newComment
Expand All @@ -530,7 +551,8 @@ function newComment($post_id, array $comment)
* Edit an existing comment.
*
* @param integer $commentId
* @param array $comment
* @param array $comment
*
* @return boolean
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Comments#wp.editComment
Expand All @@ -545,6 +567,7 @@ function editComment($commentId, array $comment)
* Remove an existing comment.
*
* @param integer $commentId
*
* @return boolean
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Comments#wp.deleteComment
Expand All @@ -557,6 +580,7 @@ function deleteComment($commentId)

/**
* Retrieve list of comment statuses.
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Comments#wp.getCommentStatusList
Expand All @@ -571,6 +595,7 @@ function getCommentStatusList()
* Retrieve blog options.
*
* @param array $options
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Options#wp.getOptions
Expand All @@ -592,6 +617,7 @@ function getOptions(array $options = array())
* Edit blog options.
*
* @param array $options
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Options#wp.setOptions
Expand Down Expand Up @@ -657,6 +683,7 @@ function getUsers(array $filters = array(), array $fields = array())
* Retrieve profile of the requesting user.
*
* @param array $fields
*
* @return array
*
* @link http://codex.wordpress.org/XML-RPC_WordPress_API/Users#wp.getProfile
Expand All @@ -675,6 +702,7 @@ function getProfile(array $fields = array())
* Edit profile of the requesting user.
*
* @param array $content
*
* @return boolean
*
* http://codex.wordpress.org/XML-RPC_WordPress_API/Users#wp.editProfile
Expand Down

0 comments on commit 01b8024

Please sign in to comment.