diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-09-20 09:54:07 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-09-20 09:54:07 -0400 |
commit | bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb (patch) | |
tree | 33456f5889d315ad2a520fcd33fe491e612588b4 /plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php | |
parent | akismet 4.0 (diff) | |
download | blogs-gentoo-bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb.tar.gz blogs-gentoo-bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb.tar.bz2 blogs-gentoo-bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb.zip |
jetpack 5.3
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php')
-rw-r--r-- | plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php index c97089b4..728fe463 100644 --- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php +++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php @@ -1,4 +1,35 @@ <?php + +new WPCOM_JSON_API_Get_Taxonomy_Endpoint( array( + 'description' => 'Get information about a single category.', + 'group' => 'taxonomy', + 'stat' => 'categories:1', + + 'method' => 'GET', + 'path' => '/sites/%s/categories/slug:%s', + 'path_labels' => array( + '$site' => '(int|string) Site ID or domain', + '$category' => '(string) The category slug' + ), + + 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/categories/slug:community' +) ); + +new WPCOM_JSON_API_Get_Taxonomy_Endpoint( array( + 'description' => 'Get information about a single tag.', + 'group' => 'taxonomy', + 'stat' => 'tags:1', + + 'method' => 'GET', + 'path' => '/sites/%s/tags/slug:%s', + 'path_labels' => array( + '$site' => '(int|string) Site ID or domain', + '$tag' => '(string) The tag slug' + ), + + 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/tags/slug:wordpresscom' +) ); + class WPCOM_JSON_API_Get_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_Endpoint { // /sites/%s/tags/slug:%s -> $blog_id, $tag_id // /sites/%s/categories/slug:%s -> $blog_id, $tag_id |