createBlogCategory method

Future<BlogCategory> createBlogCategory(
  1. String name,
  2. String description,
  3. int? parentId,
  4. bool webhookEnabled,
  5. String webhookUrl,
)

Creates a new blog category with the given data

Implementation

Future<BlogCategory> createBlogCategory(
  String name,
  String description,
  int? parentId,
  bool webhookEnabled,
  String webhookUrl,
) async {
  final response = await _post('/api/blog/category', data: {
    'name': name,
    'description': description,
    'parentId': parentId,
    'webhookEnabled': webhookEnabled,
    'webhookUrl': webhookUrl,
  });

  return BlogCategory.fromJson(response.data);
}