Appearance
API Category
Compatibility
- EE2
- EE3
- EE4
- EE5
- EE6
- EE7
Installation
- Copy the files to the
system/user/
dir - Enable the API from within the Webservice Module
Methods
create_category
Short name | Description | |
---|---|---|
group_id | The group id | Required |
parent_id | The parent category id | Optional |
cat_name | The category name | Required |
cat_description | The category description | Optional |
cat_order | The order id | Optional |
custom_field | Any custom field | Optional |
Request
Array
(
[group_id] => 1
[parent_id] => 1
[cat_name] => test category
[cat_description] => test description
)
read_category
Short name | Description | |
---|---|---|
cat_id | The category id | Optional |
cat_url_title | The category url_title | Optional |
group_id | The Group ID | Optional |
site_id | THe site ID | Optional |
include_cat_group_id | If set with any kind of value, the category group is included | Optional |
include_entries_id | If set with any kind of value, the entries associated with the category are included | Optional |
Request
Array
(
[cat_id] => 2
)
update_category
Short name | Description | |
---|---|---|
cat_id | The category id | Required |
group_id | The group id | Optional |
parent_id | The parent category id | Optional |
cat_name | The category name | Optional |
cat_description | The category description | Optional |
cat_order | The order id | Optional |
custom_field | Any custom field | Optional |
Request
Array
(
[cat_id] => 1
[group_id] => 1
[parent_id] => 1
[cat_name] => test category
[cat_description] => test description
[cat_order] => 3
)
delete_category
Short name | Description | |
---|---|---|
cat_id | The id of the category | Required |
Request
Array
(
[cat_id] => 2
)
Hooks
webservice_create_category_end
(added in v2.2)
ee()->extensions->call('webservice_create_category_end', $category_id);
webservice_read_category_end
(added in v2.2)
ee()->extensions->call('webservice_read_category_end', $category_data);
webservice_update_category_end
(added in v2.2)
ee()->extensions->call('webservice_update_category_end', $category_data);
webservice_delete_category_end
(added in v2.2)
ee()->extensions->call('webservice_delete_category_end', '');