Skip to content

Commit

Permalink
Begin updating readme & doc blocks for 1.0
Browse files Browse the repository at this point in the history
- Remove beta notices
- Update supported version to point to 4.7
- Reword introduction to clarify "isomorphic" capability
- Link to developer.wordpress.org, not wp-api.org
  • Loading branch information
kadamwhite committed Dec 6, 2016
1 parent a051c45 commit 8e286d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
A WordPress REST API client for JavaScript
==========================================

This is a client for the [WordPress REST API](http://v2.wp-api.org/). It is **under active development**, and should be considered beta software. More features are in progress, and **[issues](https://github.com/wp-api/node-wpapi/issues)** are welcome if you find something that doesn't work!

**`wpapi` is designed to work with [WP-API](https://github.com/WP-API/WP-API) v2 beta 1 or higher.** If you use a prior version of the beta, some commands will not work. The latest beta is always recommended!
This library is an isomorphic client for the [WordPress REST API](http://developer.wordpress.org/rest-api), designed to work with WordPress 4.7 or later. If you are using the older [WP REST API plugin](https://github.com/WP-API/WP-API), some commands will not work.

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/wp-api/node-wpapi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down Expand Up @@ -34,7 +32,7 @@ This is a client for the [WordPress REST API](http://v2.wp-api.org/). It is **un

## About

`node-wpapi` makes it easy for your JavaScript application to request specific resources from a [WordPress](https://wordpress.org) website. It uses a query builder-style syntax to let you craft the request being made to [WordPress REST API](http://v2.wp-api.org) endpoints, then returns the API's response to your application as a JavaScript object. And don't let the name fool you: `node-wpapi` works just as well in the browser as it does on the server!
`node-wpapi` is an isomorphic JavaScript client for the [WordPress REST API](https://developer.wordpress.org/rest-api) that makes it easy for your JavaScript application to request specific resources from a [WordPress](https://wordpress.org) website. It uses a query builder-style syntax to let you craft the request being made to REST API endpoints, then returns the API's response to your application as a JSON object. And don't let the name fool you: with [Webpack](https://webpack.github.io/) or [Browserify](http://browserify.org/), `node-wpapi` works just as well in the browser as it does on the server!

This library is maintained by K. Adam White at [Bocoup](https://bocoup.com), with contributions from a [great community](https://github.com/WP-API/node-wpapi/graphs/contributors) of WordPress and JavaScript developers.

Expand Down Expand Up @@ -653,8 +651,6 @@ Note that mixins should always return `this` to support method chaining.

## Embedding Data

_**Note:** This section applies only to the WP-API v2 betas and above; the initial 1.0 release of the API embedded data by default._

Data types in WordPress are interrelated: A post has an author, some number of tags, some number of categories, *etc*. By default, the API responses will provide pointers to these related objects, but will not embed the full resources: so, for example, the `"author"` property would come back as just the author's ID, *e.g.* `"author": 4`.

This functionality provides API consumers the flexibility to determine when and how they retrieve the related data. However, there are also times where an API consumer will want to get the most data in the fewest number of responses. Certain resources (author, comments, tags, and categories, to name a few) support *embedding*, meaning that they can be included in the response if the `_embed` query parameter is set.
Expand Down
1 change: 0 additions & 1 deletion lib/constructors/wp-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/**
* @module WPAPI
* @submodule WPRequest
* @beta
*/

var qs = require( 'qs' );
Expand Down
4 changes: 2 additions & 2 deletions wpapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
*
* @module WPAPI
* @main WPAPI
* @beta
})
*/
'use strict';

var extend = require( 'node.extend' );
var objectReduce = require( './lib/util/object-reduce' );

// All valid routes in API v2 beta 11
// This JSON file provides enough data to create handler methods for all valid
// API routes in WordPress 4.7
var defaultRoutes = require( './lib/data/default-routes.json' );
var buildRouteTree = require( './lib/route-tree' ).build;
var generateEndpointFactories = require( './lib/endpoint-factories' ).generate;
Expand Down

0 comments on commit 8e286d0

Please sign in to comment.