Skip to content
This repository was archived by the owner on Aug 27, 2019. It is now read-only.

Commit 5d1d199

Browse files
committed
initial pass at minimal docs for endpoints.
1 parent 2870041 commit 5d1d199

19 files changed

+1488
-0
lines changed

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# A sample Gemfile
2+
source "https://rubygems.org"
3+
gem 'github-pages'

_config.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: WP REST API v2 Documentation
2+
title: WP REST API v2 Documentation
3+
description: Documentation for version 2.0 of the WP REST API.
4+
# url: http://v2.wp-api.org/
5+
baseurl: /
6+
encoding: utf-8
7+
highlighter: pygments
8+
markdown: redcarpet
9+
redcarpet:
10+
extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "with_toc_data"]
11+
# markdown: kramdown
12+
# kramdown:
13+
# input: GFM
14+
# line_width: 80

_includes/header.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<div class="header">
2+
<div class="left">
3+
4+
<h1><a href="{{ site.baseurl }}">WP REST API v2 Documentation</a></h1>
5+
<ul>
6+
<li><a href="{{ site.baseurl }}">Home</a></li>
7+
<li><a href="https://github.com/WP-API/WP-API">WP REST API v2 Source</a></li>
8+
<!-- <li><a href="{{ site.baseurl }}guides.html">Guides</a></li>
9+
<li><a href="{{ site.baseurl }}internals.html">Internals</a></li>
10+
<li><a href="{{ site.baseurl }}resources.html">Resources</a></li>
11+
<li><a href="{{ site.baseurl }}misc.html">Misc</a></li> -->
12+
</ul>
13+
</div>
14+
<div class="right">
15+
<!-- GitHub buttons: see http://ghbtns.com -->
16+
<iframe src="http://ghbtns.com/github-btn.html?user=WP-API&amp;repo=WP-API&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
17+
</div>
18+
</div>

_includes/resources.md

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: WP REST API v2 Resources
3+
---
4+
Resources
5+
=========
6+
7+
Client Libraries
8+
----------------
9+
10+
* [Backbone.js client][]
11+
* [Node.js client][]
12+
* [Angular.js client][]
13+
* [PHP client][]
14+
* [C# client][]
15+
* [Mixradio API client for Windows Phone][]
16+
17+
[Backbone.js client]: https://github.com/WP-API/client-js
18+
[Node.js client]: https://github.com/kadamwhite/wordpress-rest-api
19+
[Angular.js client]: https://github.com/jeffsebring/angular-wp-api
20+
[PHP client]: https://github.com/WP-API/client-php
21+
[C# client]: https://github.com/maxcutler/wp-api-csharp
22+
[Mixradio API client for Windows Phone]: https://github.com/mixradio/wp-api-client
23+
24+
Authentication
25+
--------------
26+
27+
* [OAuth 1.0a server plugin][]
28+
* [Basic Authentication][]
29+
30+
[OAuth 1.0a server plugin]: https://github.com/WP-API/OAuth1
31+
[Basic Authentication]: https://github.com/WP-API/Basic-Auth
32+
33+
34+
Tools
35+
-----
36+
37+
* [WP-CLI client][]
38+
* [API Console][]
39+
* [WP JSON API Connect][]
40+
* [API client UI][]
41+
42+
[WP-CLI client]: https://github.com/WP-API/client-cli
43+
[API Console]: https://github.com/WP-API/api-console
44+
[WP JSON API Connect]: https://github.com/WebDevStudios/WP_JSON_API_Connect
45+
[API client UI]: https://github.com/modemlooper/Api-Clients
46+
47+
48+
WordPress Plugin Integrations
49+
------------------------------
50+
* [BuddyPress][]
51+
* [bbPress][]
52+
* [Pods Framework][]
53+
* [WooCommerce][]
54+
55+
[BuddyPress]: https://github.com/modemlooper/buddypress-json-api
56+
[bbPress]: https://github.com/thenbrent/BB-API
57+
[Pods Framework]: https://github.com/pods-framework/pods-json-api
58+
[WooCommerce]: http://woothemes.github.io/woocommerce/rest-api
59+
60+
61+
62+
Slides & Videos
63+
---------------
64+
65+
* [Rachel Baker: Put Your Content to REST With WP-API][]
66+
* [The WordPress JSON REST API][]
67+
* [Heartbeat + WP REST API v2][]
68+
* [Taylor Lovett: JSON REST API for WordPress][]
69+
* [K. Adam White: WordPress in Weird Places][]
70+
* [Ryan McCue: The WordPress REST API (WCNYC)][]
71+
72+
[Rachel Baker: Put Your Content to REST With WP-API]: http://wordpress.tv/2014/07/06/rachel-baker-put-your-content-to-rest-with-wp-api/
73+
[The WordPress JSON REST API]: https://speakerdeck.com/rmccue/wcmke2014
74+
[Heartbeat + WP REST API v2]: http://www.getsource.net/wp-content/uploads/2014/08/WCNYC-Heartbeat.pdf
75+
[Taylor Lovett: JSON REST API for WordPress]: http://www.slideshare.net/tlovett1/json-rest-api-for-wordpress-39599181
76+
[K. Adam White: WordPress in Weird Places]: http://kadamwhite.github.io/talks/2014/wcsf-node-wp/#/
77+
[Ryan McCue: The WordPress REST API (WCNYC)]: https://wordpress.tv/2014/11/19/ryan-mccue-the-wordpress-rest-api/
78+
79+
REST Info & Tools
80+
-----------------
81+
82+
* [More About REST][]
83+
* [Postman HTTP Chrome Plugin][]
84+
* [Paw HTTP App for OSX][]
85+
* [JSONView Chrome Extension][]
86+
87+
[More About REST]: http://www.restapitutorial.com/lessons/whatisrest.html
88+
[Postman HTTP Chrome Plugin]: https://www.getpostman.com/
89+
[Paw HTTP App for OSX]: http://luckymarmot.com/paw
90+
[JSONView Chrome Extension]: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc
91+
92+
Tutorials
93+
---------
94+
* [An Overview of the WordPress JSON API][] Detailed Overview of the REST API projects and helpful links.
95+
* [Using the WordPress REST API in a mobile app][] A detailed tutorial with complete example code on the basics of using the REST API in a app outside of WordPress.
96+
* [WordPress REST API][] A basic introduction to the REST API.
97+
* [A Look at the WordPress HTTP API][] Part of a series on the WordPress HTTP API, which can be used to interact with the WordPress REST API from within WordPress.
98+
* [Designing a class: WordPress API client][] Guide to building a class for making GET requests to the REST API's users end point via the WordPress HTTP API.
99+
* [An Introduction To The JSON REST API][] An introduction to interacting with the REST API from inside of WordPress, showing how to retrieve and display data from the current site or a remote site via GET requests.
100+
* [An Introduction To The JSON REST API Part2][] More information on how interact with the REST API from inside of WordPress, showing how to create posts using data from a remote site, or create posts on a remote site.
101+
* [Using AngularJS And JSON API In Your WordPress Theme][] An introduction to using the REST API, and Angular JS in a WordPress theme.
102+
* [Working with Meta Data Using the JSON REST API][] Using the REST API to work with post meta data.
103+
* [Working with Taxonomies Using the JSON REST API][] Using the REST API to work with taxonomies.
104+
* [Processing Forms with AJAX Using the JSON REST API][] A guide to using the REST API to edit posts using AJAX.
105+
106+
[An Overview of the WordPress JSON API]:http://webdevstudios.com/2014/10/16/an-overview-of-wordpress-json-api/
107+
[Using the WordPress REST API in a mobile app]: http://apppresser.com/using-wordpress-rest-api-mobile-app/
108+
[WordPress REST API]: http://themergency.com/wordpress-rest-api/
109+
[A Look at the WordPress HTTP API]: http://code.tutsplus.com/tutorials/a-look-at-the-wordpress-http-api-a-review--wp-32531
110+
[Designing a class: WordPress API client]: http://carlalexander.ca/designing-class-wordpress-api-client
111+
[An Introduction To The JSON REST API]: http://torquemag.io/introduction-wordpress-new-universal-connector-json-rest-api/
112+
[An Introduction To The JSON REST API Part2]: http://torquemag.io/introduction-wordpress-rest-api-part-2/
113+
[Using AngularJS And JSON API In Your WordPress Theme]: http://1fix.io/blog/2014/11/05/angularjs-json-api-wp-theme/
114+
[Working with Meta Data Using the JSON REST API]: http://torquemag.io/working-meta-data-using-json-rest-api/
115+
[Working with Taxonomies Using the JSON REST API]: http://torquemag.io/working-taxonomies-using-json-rest-api/
116+
[Processing Forms with AJAX Using the JSON REST API]: http://torquemag.io/processing-forms-ajax-using-json-rest-api/
117+

_includes/routes/comments.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Comments
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
| `id` | integer | Unique identifier for the object. | view, edit |
8+
| `author` | integer | The ID of the user object, if author was a user. | view, edit |
9+
| `author_email` | email | Email address for the object author. | edit |
10+
| `author_ip` | string | IP address for the object author. | edit |
11+
| `author_name` | string | Display name for the object author. | view, edit |
12+
| `author_url` | uri | Url for the object author. | view, edit |
13+
| `author_user_agent` | string | User agent for the object author. | edit |
14+
| `content` | object | The content for the object. | view, edit |
15+
| `date` | date-time | The date the object was published. | view, edit |
16+
| `date_gmt` | date-time | The date the object was published as GMT. | edit |
17+
| `karma` | integer | Karma for the object. | edit |
18+
| `link` | uri | URL to the object. | view, edit |
19+
| `parent` | integer | The ID for the parent of the object. | view, edit |
20+
| `post` | integer | The ID of the associated post object. | view, edit |
21+
| `status` | string | State of the object. | view, edit |
22+
| `type` | string | Type of Comment for the object. | view, edit |
23+
24+
25+
### List all Comments
26+
27+
### Create a Comment
28+
29+
### Retrieve a Comment
30+
31+
### Update a Comment
32+
33+
### Delete a Comment

_includes/routes/media.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Media
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
| `date` | date-time | The date the object was published. | view, edit |
8+
| `date_gmt` | date-time | The date the object was published, as GMT. | edit |
9+
| `guid` | object | The globally unique identifier for the object. | view, edit |
10+
| `id` | integer | Unique identifier for the object. | view, edit |
11+
| `link` | uri | URL to the object. | view, edit |
12+
| `modified` | date-time | The date the object was last modified. | view, edit |
13+
| `modified_gmt` | date-time | The date the object was last modified, as GMT. | view, edit |
14+
| `password` | string | A password to protect access to the post. | edit |
15+
| `slug` | string | An alphanumeric identifier for the object unique to its type. | view, edit |
16+
| `status` | string | A named status for the object. | edit |
17+
| `type` | string | Type of Post for the object. | view, edit |
18+
| `title` | object | The title for the object. | view, edit |
19+
| `author` | integer | The ID for the author of the object. | view, edit |
20+
| `comment_status` | string | Whether or not comments are open on the object. | view, edit |
21+
| `ping_status` | string | Whether or not the object can be pinged. | view, edit |
22+
| `alt_text` | string | Alternative text to display when attachment is not displayed. | view, edit |
23+
| `caption` | string | The caption for the attachment. | view, edit |
24+
| `description` | string | The description for the attachment. | view, edit |
25+
| `media_type` | string | Type of attachment. | view, edit |
26+
| `media_details` | object | Details about the attachment file, specific to its type. | view, edit |
27+
| `post` | integer | The ID for the associated post of the attachment. | view, edit |
28+
| `source_url` | uri | URL to the original attachment file. | view, edit |
29+
30+
### List all Attachments
31+
32+
### Create an Attachment
33+
34+
### Retrieve an Attachment
35+
36+
### Update an Attachment
37+
38+
### Delete an Attachment

_includes/routes/pages.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Pages
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
| `date` | date-time | The date the object was published. | view, edit |
8+
| `date_gmt` | date-time | The date the object was published, as GMT. | edit |
9+
| `guid` | object | The globally unique identifier for the object. | view, edit |
10+
| `id` | integer | Unique identifier for the object. | view, edit |
11+
| `link` | uri | URL to the object. | view, edit |
12+
| `modified` | date-time | The date the object was last modified. | view, edit |
13+
| `modified_gmt` | date-time | The date the object was last modified, as GMT. | view, edit |
14+
| `password` | string | A password to protect access to the post. | edit |
15+
| `slug` | string | An alphanumeric identifier for the object unique to its type. | view, edit |
16+
| `status` | string | A named status for the object. | edit |
17+
| `type` | string | Type of Post for the object. | view, edit |
18+
| `parent` | integer | The ID for the parent of the object. | view, edit |
19+
| `title` | object | The title for the object. | view, edit |
20+
| `content` | object | The content for the object. | view, edit |
21+
| `author` | integer | The ID for the author of the object. | view, edit |
22+
| `excerpt` | object | The excerpt for the object. | view, edit |
23+
| `featured_image` | integer | ID of the featured image for the object. | view, edit |
24+
| `comment_status` | string | Whether or not comments are open on the object. | view, edit |
25+
| `ping_status` | string | Whether or not the object can be pinged. | view, edit |
26+
| `menu_order` | integer | The order of the object in relation to other object of its type. | view, edit |
27+
| `template` | string | The theme file to use to display the object. | view, edit |
28+
29+
### List all Pages
30+
31+
### Create a Page
32+
33+
### Retrieve a Page
34+
35+
### Update a Page
36+
37+
### Delete a Page

_includes/routes/post_meta.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Post Meta
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
| `id` | int | Unique identifier for the object. | edit |
8+
| `key` | string | The key for the custom field. | edit |
9+
| `value` | string | The value of the custom field. | edit |
10+
11+
### List all Meta for a Post
12+
13+
### Create Meta for a Post
14+
15+
### Retrieve Meta for a Post
16+
17+
### Update Meta for a Post
18+
19+
### Delete Meta for a Post

_includes/routes/post_revisions.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Post Revisions
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
| `author` | integer | The ID for the author of the object. | view |
8+
| `date` | date-time | The date the object was published. | view |
9+
| `date_gmt` | date-time | The date the object was published, as GMT. | view |
10+
| `guid` | string | GUID for the object, as it exists in the database. | view |
11+
| `id` | integer | Unique identifier for the object. | view |
12+
| `modified` | date-time | The date the object was last modified. | view |
13+
| `modified_gmt` | date-time | The date the object was last modified, as GMT. | view |
14+
| `parent` | integer | The ID for the parent of the object. | view |
15+
| `slug` | string | An alphanumeric identifier for the object unique to its type. | view |
16+
| `title` | string | Title for the object, as it exists in the database. | view |
17+
| `content` | string | Content for the object, as it exists in the database. | view |
18+
| `excerpt` | string | Excerpt for the object, as it exists in the database. | view |
19+
20+
### List all Revisions for a Post
21+
22+
### Create a Revision for a Post
23+
24+
### Retrieve a Revision for a Post
25+
26+
### Update a Revision for a Post
27+
28+
### Delete a Revision for a Post

_includes/routes/posts.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Posts
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
| `date` | date-time | The date the object was published. | view, edit |
8+
| `date_gmt` | date-time | The date the object was published, as GMT. | edit |
9+
| `guid` | object | The globally unique identifier for the object. | view, edit |
10+
| `id` | integer | Unique identifier for the object. | view, edit |
11+
| link | uri | URL to the object. | view, edit |
12+
| `modified` | date-time | The date the object was last modified. | view, edit |
13+
| `modified_gmt` | date-time | The date the object was last modified, as GMT. | view, edit |
14+
| `password` | string | A password to protect access to the post. | edit |
15+
| slug | string | An alphanumeric identifier for the object unique to its type. | view, edit |
16+
| `status` | string | A named status for the object. | edit |
17+
| `type` | string | Type of Post for the object. | view, edit |
18+
| `title` | object | The title for the object. | view, edit |
19+
| `content` | object | The content for the object. | view, edit |
20+
| `author` | integer | The ID for the author of the object. | view, edit |
21+
| `excerpt` | object | The excerpt for the object. | view, edit |
22+
| `featured_image` | integer | ID of the featured image for the object. | view, edit |
23+
| `comment_status` | string | Whether or not comments are open on the object. | view, edit |
24+
| `ping_status` | string | Whether or not the object can be pinged. | view, edit |
25+
| `format` | string | The format for the object. | view, edit |
26+
| `sticky` | boolean | Whether or not the object should be treated as sticky. | view, edit |
27+
28+
### List all Posts
29+
30+
### Create a Post
31+
32+
### Retrieve a Post
33+
34+
### Update a Post
35+
36+
### Delete a Post

_includes/routes/taxonomies.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Taxonomies
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
`description` | string | A human-readable description of the object. | view |
8+
| `hierarchical` | boolean | Whether or not the type should have children. | view |
9+
| `labels` | object | Human-readable labels for the type for various contexts. | view |
10+
| `name` | string | The title for the object. | view |
11+
| `slug` | string | An alphanumeric identifier for the object. | view |
12+
| `show_cloud` | boolean | Whether or not the term cloud should be displayed. | view |
13+
| `types` | array | Types associated with taxonomy. | view |
14+
15+
### List all Taxonomies
16+
17+
### Retrieve a Taxonomy

_includes/routes/terms.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Terms
2+
3+
### Schema
4+
5+
| Property | Type | Description | Context |
6+
| :------- | :--- | :---------- | :------ |
7+
| `id` | integer | Unique identifier for the object. | view |
8+
| `count` | integer | Number of published posts for the object. | view |
9+
| `description` | string | A human-readable description of the object. | view |
10+
| `link` | uri | URL to the object. | view |
11+
| `name` | string | The title for the object. | view |
12+
| `parent` | integer | The ID for the parent of the object. | view |
13+
| `slug` | string | An alphanumeric identifier for the object unique to its type. | view |
14+
| `taxonomy` | string | Type attribution for the object. | view |
15+
16+
### List all Terms for a Taxonomy
17+
18+
### Retrieve a Term for a Taxonomy

0 commit comments

Comments
 (0)