Update API

j 2024-06-22 08:16:30 +00:00
parent 017c028c7d
commit 75b6118b9f

19
API.md

@ -61,17 +61,6 @@ var_dump($result);
<html> <html>
<head> <head>
<script> <script>
function pandora_api(action, data, callback) {
var url = 'http://archive.arabdigitalexpression.org/api/';
$.ajax({
type: "POST",
url: url,
data: {action: action, data: JSON.stringify(data)},
success: callback,
dataType: 'json'
});
}
function pandora_api(action, data, callback) { function pandora_api(action, data, callback) {
var url = 'http://archive.arabdigitalexpression.org/api/'; var url = 'http://archive.arabdigitalexpression.org/api/';
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
@ -86,7 +75,9 @@ var_dump($result);
xhr.send(formData); xhr.send(formData);
} }
pandora_api('find', {query: ....}, function(result) {console.log(result)}); pandora_api('find', {query: ....}, function(result) {
console.log(result)
});
</script> </script>
</head> </head>
<body> <body>
@ -109,7 +100,9 @@ Ox.load({
Ox.API({ Ox.API({
url: "https://0xdb.org/api/" url: "https://0xdb.org/api/"
}, function(api) { }, function(api) {
console.log(api); api.find( {query: ....}, function(result) {
console.log(result)
});
}); });
}); });
</script> </script>