Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

Enable a name remapping feature, remap plural models to singular #75

Merged
merged 2 commits into from
Jan 9, 2016

Conversation

adamsilverstein
Copy link

before:

after:

adamsilverstein pushed a commit that referenced this pull request Jan 9, 2016
Enable a name remapping feature, remap plural models to singular
@adamsilverstein adamsilverstein merged commit 8dd6375 into master Jan 9, 2016
adamsilverstein pushed a commit to WP-API/WP-API that referenced this pull request Jan 9, 2016
adamsilverstein pushed a commit to WP-API/WP-API that referenced this pull request Jan 10, 2016
* Development happening at https://github.com/WP-API/client-js

Full changeset: WP-API/client-js@22b1e42...master

Props: @delphinus35, @adamsilverstein, @westonruter

Change highlights:
* Api builds models and collections from Schema, no hard coded models or collections; any endpoint in the schema will be mapped; supports multiple schemas (apis); helper methods for post model: all helpers user _embed data if available, otherwise using ajax request.
* new: Async load of api, apps can use the deferred to time startup
* new: Ability to localize schema, falls back to making an ajax request & cached in session storage; develop branch of client js has code that only localizes data once per session
* new Helper methods for Posts model: getCategories and setCategories
* fix: cleanup TimeStampedMixin
* new: models/collections get defaults and options from schema
* fix: all code up to WordPress JavaScript coding standards
* new: helper method to get post author user model `getAuthorUser`
* new: helper method to get a featured image for a post: `getFeaturedImage`
* new: models protect methods based on endpoint methods (eg. destory is blocked if an endpoint doesn't have a 'DELETE' method)
* new: models contain a reference to the original route object
* Ensure getters always return promise
* Add remapping for names, see WP-API/client-js#75
* additional helpers: add getMeta, getTags, getRevisions #76
* When SCRIPT_DEBUG off, use minified script; update localized data
adamsilverstein pushed a commit to WP-API/WP-API that referenced this pull request Jan 10, 2016
* Development happening at https://github.com/WP-API/client-js

Full changeset: WP-API/client-js@22b1e42...477a49f

Props: @delphinus35, @adamsilverstein, @westonruter

Change highlights:
* Api builds models and collections from Schema, no hard coded models or collections; any endpoint in the schema will be mapped; supports multiple schemas (apis); helper methods for post model: all helpers user _embed data if available, otherwise using ajax request.
* new: Async load of api, apps can use the deferred to time startup
* new: Ability to localize schema, falls back to making an ajax request & cached in session storage; develop branch of client js has code that only localizes data once per session
* new Helper methods for Posts model: getCategories and setCategories
* fix: cleanup TimeStampedMixin
* new: models/collections get defaults and options from schema
* fix: all code up to WordPress JavaScript coding standards
* new: helper method to get post author user model `getAuthorUser`
* new: helper method to get a featured image for a post: `getFeaturedImage`
* new: models protect methods based on endpoint methods (eg. destory is blocked if an endpoint doesn't have a 'DELETE' method)
* new: models contain a reference to the original route object
* Ensure getters always return promise
* Add remapping for names, see WP-API/client-js#75
* additional helpers: add getMeta, getTags, getRevisions #76
* When SCRIPT_DEBUG off, use minified script; update localized data
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant