{"id":40026,"date":"2015-11-10T22:52:01","date_gmt":"2015-11-10T22:52:01","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wprestapiextensions\/"},"modified":"2015-11-10T22:52:01","modified_gmt":"2015-11-10T22:52:01","slug":"wprestapiextensions","status":"publish","type":"plugin","link":"https:\/\/bs.wordpress.org\/plugins\/wprestapiextensions\/","author":14644160,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.6","stable_tag":"trunk","tested":"4.3.34","requires":"4.3.1","requires_php":"","requires_plugins":"","header_name":"WPRestApiExtensions","header_author":"Lars Jensen","header_description":"","assets_banners_color":"","last_updated":"2015-11-10 22:52:01","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/exenova.dk\/","header_plugin_uri":"https:\/\/github.com\/larjen\/WPRestApiExtensions","header_author_uri":"http:\/\/exenova.dk\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1177,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.6"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2133],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-40026","plugin","type-plugin","status-publish","hentry","plugin_tags-toggle","plugin_committers-larjen"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wprestapiextensions.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Extends the WP-REST API with custom read only endpoints.<\/p>\n <p>If you have a WordPress blog at http:\/\/www.example.com you can reach the read only REST API by requesting these endpoints:<\/p>\n <pre><code>http:\/\/www.example.com\/wp-json\/wprestapiextensions\/v1\/posts?page=1&amp;per_page=12&amp;search=query&amp;tags=tag1+tag2 http:\/\/www.example.com\/wp-json\/wprestapiextensions\/v1\/tag?tag_name=tag1 http:\/\/www.example.com\/wp-json\/wprestapiextensions\/v1\/post <\/code><\/pre>\n <p>The above endpoints does read from database whenever they are requested, and are thus very slow to react.<\/p>\n <p>From within the plugin, there is an option to deploy a cache in front of this REST API. When you deploy it, be warned that the folder \"rest-api\" will be created in the root of your webserver.<\/p>\n <p>You can then request the REST-API like this:<\/p>\n <pre><code>http:\/\/www.example.com\/rest-api\/v1\/posts?page=1&amp;per_page=12&amp;search=query&amp;tags=tag1+tag2 http:\/\/www.example.com\/rest-api\/v1\/tag\/?_jsonp=angular.callbacks._1&amp;tag_name=tag1 <\/code><\/pre>\n <p>Since these requests are infinitely cached, you can schedule an optional wipe of the cache which will occur 5 minutes after last post alteration.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download to your Wordpress plugin folder and unzip.<\/li>\n<li>Activate plugin.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<h4>Do I use this at my own risk?<\/h4>\n <p>Yes.<\/p>\n\n<!--section=changelog-->\n<h4>1.0.6<\/h4>\n <ul>\n<li>Refactoring plugin for better performance.<\/li>\n<li>Adding an infinite cache for faster rest-api requests.<\/li>\n<li>Deploy cache mechanism from control panel.<\/li>\n<li>Optional wipe cache functionality when posts have been altered.<\/li>\n<\/ul>\n <h4>1.0.5<\/h4>\n <ul>\n<li>Added search capability.<\/li>\n<li>Added simple pagination.<\/li>\n<li>Added a five minute caching.<\/li>\n<\/ul>\n <h4>1.0.4<\/h4>\n <ul>\n<li>Added new endpoints for posts.<\/li>\n<li>Wrapping responses<\/li>\n<\/ul>\n <h4>1.0.3<\/h4>\n <ul>\n<li>If you request a tag with spaces in the name, before failing it will also try searching for a tag where spaces has been replaces with '-' tags.<\/li>\n<\/ul>\n <h4>1.0.2<\/h4>\n <ul>\n<li>Added endpoint so you can get a tag.<\/li>\n<\/ul>\n <h4>1.0.1<\/h4>\n <ul>\n<li>Added categories to response for posts.<\/li>\n<\/ul>\n <h4>1.0.0<\/h4>\n <ul>\n<li>Uploaded plugin.<\/li>\n<\/ul>","raw_excerpt":"Extends the WP-REST API with custom read only endpoints.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/40026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=40026"}],"author":[{"embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/larjen"}],"wp:attachment":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=40026"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=40026"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=40026"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=40026"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=40026"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=40026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}