| Method | Description | arguments |
|---|---|---|
| Method | Description | arguments |
get_posts |
Call this method to get the recent posts/pages or specify the post/page id to get the specified post information. |
argument: dev (optional) value: 1 >> pretty output in browser value: 0 >> default json format to use in your program example: ?wpapi=get_posts&dev=1 argument: id (optional) value: post or page id >> show information about the specified post example: ?wpapi=get_posts&dev=1&id=1 argument: count (optional) value: number of items per page >> specify the number of post items to be returned. argument: page (optional) value: page number >> if count is set, use the page argument to move forward through the rest of the items. example: ?wpapi=get_posts&dev=1&count=2&page=1 argument: comment (optional) value: 1 >> Return comments if available value: 0 >> Don't return comments argument: content (optional) value: 1 >> Return the content value: 0 >> Don't return the content example: ?wpapi=get_posts&dev=1&comment=1&content=1 argument: type (optional) value: posts type >> Put post and get only posts, put page and get only pages example: ?wpapi=get_posts&dev=1&type=page |
get_tags |
Call this method to retrieve all tag information |
argument: dev (optional) Read more about it in get_posts method argument: count (optional) Read more about it in get_posts method argument: page (optional) Read more about it in get_posts method example: ?wpapi=get_tags&dev=1 argument: id (optional) value: tag id >> return information about the specified tag example: ?wpapi=get_tags&dev=1&id=1 argument: cat (optional) value: 1 >> returns those tags with taxonomy of category value: 0 >> does not return tags with taxonomy of category argument: tag (optional) value: 1 >> returns normal tags value: 0 >> does not return normal tags example: ?wpapi=get_tags&dev=1&cat=1&tag=1 |
get_author |
Call this method to retrieve information about authors registered in the wordpress blog |
argument: dev (optional) Read more about it in get_posts method argument: count (optional) Read more about it in get_posts method argument: page (optional) Read more about it in get_posts method example: ?wpapi=get_author&dev=1 argument: id (optional) value: author id >> return information about the specified author example: ?wpapi=get_author&dev=1&id=1 |
gravatar |
Call this method to connect to the gravatar api and retrieve the gravatar based on the email address you specify. |
argument: dev (optional) Read more about it in get_posts method example: ?wpapi=gravatar&dev=1 argument: email (required) value: standard email address >> the email address to found its gravatar argument: size (optional) value: size of the gravatar in pixel >> size of the returned gravatar image, default value is 100 which means the returned gravatar image will be 100X100 pixel example: ?wpapi=gravatar&dev=1&email=email@site.com&size=200 |
search |
Call this method and pass keyword argument to return the search results. |
argument: dev (optional) Read more about it in get_posts method argument: count (optional) Read more about it in get_posts method argument: page (optional) Read more about it in get_posts method argument: comment (optional) Read more about it in get_posts method argument: content (optional) Read more about it in get_posts method argument: type (optional) Read more about it in get_posts method example: ?wpapi=search&dev=1&keyword=post&count=2&page=1&content=1&comment=1&type=post argument: keyword (required) value: search string >> the keyword to be searched. example: ?wpapi=search&dev=1&keyword=something |
comment |
Call this method to submit a comment on a post. |
argument: dev (optional) Read more about it in get_posts method example: ?wpapi=comment&dev=1 argument: name (required) value: author name >> name of the person who's leaving the comment argument: email (required) value: author email address >> email address of the person who's leaving the comment argument: content (required) value: comment content >> content of the comment argument: post_id (required) value: post id >> id of the post which you are submitting your comment to example: ?wpapi=comment&dev=1&name=Hadi&email=email@site.com&content=some content to comment&post_id=1 argument: website (optional) value: www.your-site.com >> Optionally you can pass author's website argument: parent (optional) value: reply to id >> parent is the id of the comment which this will be a reply to. default value is 0 example: ?wpapi=comment&dev=1&name=Hadi&email=email@site.com&content=some content to comment&post_id=1&website=www.your-site.com&parent=0 |