Quick Start
Make your first request
Cara menggunakan OpenAPI ini cukup mudah, anda tidak perlu secret key maupun api key, cukup dengan hit endpoint yang disediakan anda bisa langsung memiliki response yang anda inginkan seperti dibawah ini:
Get Books.
GET https://openapi.omdo.site/api/books
Endpoint untuk mendapatkan semua buku yang ada pada koleksi database.
{
"success": true,
"message": "Books retrieved successfully",
"data": [
{
"id": 1,
"name": "Book Name",
"description": "Book Description",
"pages": 200,
"published_at": "2022-01-01",
"author": "Book Author",
"price": 19.99,
"genre_id": 1,
"genre": {
"id": 1,
"name": "Genre Name",
"description": "Genre Description",
"genre_id": 1,
"category": {
"id": 1,
"name": "Category Name",
"description": "Category Description"
},
"books": [
"string"
]
}
}
]
}<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://openapi.omdo.site/api/books',
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/books", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://openapi.omdo.site/api/books',
headers: { }
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
curl --location 'https://openapi.omdo.site/api/books'Last updated