Categories
Category merupakan tipe dari genre untuk mengklasifikasikan genre berdasarkan buku-buku. Category dapat di pilih berdasarkan genre yang akan dibuat nanti.
Get All Categories
Get All
{
"success": true,
"message": "Categories retrieved successfully",
"data": [
{
"id": 1,
"name": "Dewasa",
"description": "Category Kedewasaan yang haqiqi",
"created_at": "2023-07-04T05:45:39.000000Z",
"updated_at": "2023-07-04T05:45:39.000000Z"
}
]
}<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://openapi.omdo.site0/api/categories',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://openapi.omdo.site/api/categories", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Get Categories by ID
Path Parameters
Name
Type
Description
Create Category
Headers
Name
Type
Description
Request Body
Name
Type
Description
Update Category
Path Parameters
Name
Type
Description
Headers
Name
Type
Description
Request Body
Name
Type
Description
Delete Category
Path Parameters
Name
Type
Description
Last updated