This repository was 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
Conversation
adamsilverstein
added a commit
that referenced
this pull request
Jan 9, 2016
Enable a name remapping feature, remap plural models to singular
adamsilverstein
added a commit
to WP-API/WP-API
that referenced
this pull request
Jan 9, 2016
adamsilverstein
added 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
added 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
before:

after:
