wpsharks / wp-kb-articles-kb

KB repo for the WP KB Articles plugin.
0 stars 0 forks source link

Taxonomy Query API Documentation #10

Open raamdev opened 9 years ago

raamdev commented 9 years ago

KB Article Creation Checklist

Additional TODO list items go here.

title: Taxonomy Query API Documentation
categories: tutorials
tags: api-scripting, search-functionality
author: raamdev
github-issue: https://github.com/websharks/wp-kb-articles-kb/issues/10

[https://github.com/websharks/wp-kb-articles/issues/105#issuecomment-94904447]

Endpoint: /wp-kb-articles/api/tax-query

Query args:

Example response:

{
    "results": [
        {
            "id": "16",
            "name": "[s2File /] Shortcode",
            "slug": "s2file",
            "url": "http://s2member.com/kb/kb-tag/s2file/",
            "description": "",
            "parent_id": "0",
            "count": "4"
        },
        {
            "id": "78",
            "name": "[s2Get /] Shortcode",
            "slug": "s2get",
            "url": "http://s2member.com/kb/kb-tag/s2get/",
            "description": "",
            "parent_id": "0",
            "count": "1"
        },
        {
            "id": "80",
            "name": "[s2If /] Shortcode",
            "slug": "s2if",
            "url": "http://s2member.com/kb/kb-tag/s2if/",
            "description": "",
            "parent_id": "0",
            "count": "2"
        },
        {
            "id": "37",
            "name": "[s2Member-List /] Shortcode",
            "slug": "s2member-list",
            "url": "http://s2member.com/kb/kb-tag/s2member-list/",
            "description": "",
            "parent_id": "0",
            "count": "5"
        },
        {
            "id": "77",
            "name": "[s2MOP /] Shortcode",
            "slug": "s2mop",
            "url": "http://s2member.com/kb/kb-tag/s2mop/",
            "description": "",
            "parent_id": "0",
            "count": "3"
        },
        {
            "id": "17",
            "name": "[s2Stream /] Shortcode",
            "slug": "s2stream",
            "url": "http://s2member.com/kb/kb-tag/s2stream/",
            "description": "",
            "parent_id": "0",
            "count": "8"
        },
        {
            "id": "18",
            "name": "Shortcodes",
            "slug": "shortcodes",
            "url": "http://s2member.com/kb/kb-tag/shortcodes/",
            "description": "",
            "parent_id": "0",
            "count": "20"
        }
    ],
    "args": {
        "type": "tag",
        "q": "shortcode",
        "expand": true
    }
}
raamdev commented 9 years ago

@jaswsinc We may want to just update the existing Query API Documentation to include a new section for the Taxonomy Query API, instead of creating a separate KB article--I'm not sure.