{"id":767,"date":"2019-05-09T15:14:57","date_gmt":"2019-05-09T15:14:57","guid":{"rendered":"https:\/\/wpgeodirectory.com\/docs-v2\/?post_type=docs&#038;p=767"},"modified":"2019-05-13T15:15:37","modified_gmt":"2019-05-13T15:15:37","slug":"review","status":"publish","type":"docs","link":"https:\/\/wpgeodirectory.com\/docs-v2\/api\/review\/","title":{"rendered":"Review"},"content":{"rendered":"<p><span class=\"bookmark-index\"><br \/>\n<a href=\"#intro\">Introduction<\/a><br \/>\n<a href=\"#endpoint\">List Endpoints<\/a><br \/>\n<a href=\"#create-comment\">Create Comment<\/a><br \/>\n<a href=\"#list-by-id\">List Comment<\/a><br \/>\n<a href=\"#update-comment\">Update Comment<\/a><\/p>\n<p><\/span><\/p>\n<h3><a href=\"#intro\">Introduction<\/a><\/h3>\n<p>REST API End Points for managing and checking GD Reviews.<\/p>\n<h3 id='endpoint'>EndPoints<\/h3>\n<div class=\"api-endpoint\">\n<div class=\"endpoint-data\">\n<p><label class=\"label-get\">GET<\/label><\/p>\n<h6>\/wp-json\/geodir\/v2\/reviews<\/h6>\n<\/div>\n<\/div>\n<p><strong>Output<\/strong><\/p>\n<pre>\r\n[\r\n    {\r\n        \"id\": 25,\r\n        \"post\": 871,\r\n        \"parent\": 0,\r\n        \"author\": 1,\r\n        \"author_name\": \"admin\",\r\n        \"author_url\": \"\",\r\n        \"date\": \"2019-05-09T15:13:05\",\r\n        \"date_gmt\": \"2019-05-09T15:13:05\",\r\n        \"content\": {\r\n            \"rendered\": \"<div class=\\\"description\\\"><p>Some ttext<\/p>\\n<\/div>\"\r\n        },\r\n        \"link\": \"http:\/\/local.newwp.test\/places\/canada\/ontario\/king\/houses\/richmore-apartments-test123-food2#comment-25\",\r\n        \"status\": \"approved\",\r\n        \"type\": \"comment\",\r\n        \"post_type\": \"gd_place\",\r\n        \"rating\": 5,\r\n        \"country\": \"Canada\",\r\n        \"region\": \"Ontario\",\r\n        \"city\": \"King\",\r\n        \"latitude\": \"-79.58547458052635\",\r\n        \"longitude\": \"44.012415575653726\",\r\n        \"author_avatar_urls\": {\r\n            \"24\": \"http:\/\/1.gravatar.com\/avatar\/ad5dd285560221a7302608c74c690035?s=24&d=mm&r=g\",\r\n            \"48\": \"http:\/\/1.gravatar.com\/avatar\/ad5dd285560221a7302608c74c690035?s=48&d=mm&r=g\",\r\n            \"96\": \"http:\/\/1.gravatar.com\/avatar\/ad5dd285560221a7302608c74c690035?s=96&d=mm&r=g\"\r\n        },\r\n        \"meta\": [],\r\n        \"_links\": {\r\n            \"self\": [\r\n                {\r\n                    \"href\": \"http:\/\/local.newwp.test\/wp-json\/geodir\/v2\/reviews\/25\"\r\n                }\r\n            ],\r\n            \"collection\": [\r\n                {\r\n                    \"href\": \"http:\/\/local.newwp.test\/wp-json\/geodir\/v2\/reviews\"\r\n                }\r\n            ],\r\n            \"author\": [\r\n                {\r\n                    \"embeddable\": true,\r\n                    \"href\": \"http:\/\/local.newwp.test\/wp-json\/wp\/v2\/users\/1\"\r\n                }\r\n            ],\r\n            \"up\": [\r\n                {\r\n                    \"embeddable\": true,\r\n                    \"post_type\": \"gd_place\",\r\n                    \"href\": \"http:\/\/local.newwp.test\/wp-json\/geodir\/v2\/places\/871\"\r\n                }\r\n            ]\r\n        }\r\n    }\r\n]\r\n<\/pre>\n<h3 id='create-comment'>Create Comment<\/h3>\n<div class=\"api-endpoint\">\n<div class=\"endpoint-data\">\n<p><label class=\"label-get\">POST<\/label><\/p>\n<h6>\/wp-json\/geodir\/v2\/reviews<\/h6>\n<\/div>\n<\/div>\n<p><strong>Output<\/strong><br \/>\nTo Create comment we will need to authenticate user with Token Key.<\/p>\n<p><img class=\"alignnone wp-image-769 size-large\" src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.02-PM-1024x574.png\" alt=\"\" width=\"835\" height=\"468\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.02-PM-1024x574.png 1024w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.02-PM-300x168.png 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.02-PM-768x430.png 768w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><\/p>\n<p><img class=\"alignnone wp-image-770 size-large\" src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.12-PM-1024x573.png\" alt=\"\" width=\"835\" height=\"467\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.12-PM-1024x573.png 1024w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.12-PM-300x168.png 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-09-at-10.20.12-PM-768x430.png 768w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><\/p>\n<h3 id='list-by-id'>List Comment by ID EndPoints<\/h3>\n<div class=\"api-endpoint\">\n<div class=\"endpoint-data\">\n<p><label class=\"label-get\">GET<\/label><\/p>\n<h6>\/wp-json\/geodir\/v2\/reviews\/[post_id]<\/h6>\n<\/div>\n<\/div>\n<p>Get list of comment by comment id.<\/p>\n<p><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.06.23-PM-1024x665.png\" alt=\"\" width=\"835\" height=\"542\" class=\"alignnone size-large wp-image-777\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.06.23-PM-1024x665.png 1024w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.06.23-PM-300x195.png 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.06.23-PM-768x498.png 768w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><\/p>\n<h3 id='update-comment'>Update Comment EndPoints<\/a><\/h3>\n<p> You will need to add authorization header. <\/p>\n<div class=\"api-endpoint\">\n<div class=\"endpoint-data\">\n<p><label class=\"label-get\">POST<\/label><\/p>\n<h6>\/wp-json\/geodir\/v2\/reviews\/[post_id]<\/h6>\n<\/div>\n<\/div>\n<p><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.27.21-PM-1024x663.png\" alt=\"\" width=\"835\" height=\"541\" class=\"alignnone size-large wp-image-778\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.27.21-PM-1024x663.png 1024w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.27.21-PM-300x194.png 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/05\/Screenshot-2019-05-10-at-9.27.21-PM-768x497.png 768w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><\/p>\n","protected":false},"featured_media":0,"parent":750,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/767"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/comments?post=767"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/767\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/750"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/media?parent=767"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/doc_tag?post=767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}