أمثلة الأكواد
JavaScript
const r = await fetch("https://api.lekando.com/v1/countries/ae", {
headers: { Authorization: "Bearer YOUR_KEY" }
});
const { data, meta } = await r.json();
console.log(data.name, meta.verified);PHP
$ctx = stream_context_create(["http" => [
"header" => "Authorization: Bearer YOUR_KEY"
]]);
$res = json_decode(file_get_contents(
"https://api.lekando.com/v1/countries/ae", false, $ctx), true);
echo $res["data"]["name"]["en"];
Python
import urllib.request, json
req = urllib.request.Request(
"https://api.lekando.com/v1/countries/ae",
headers={"Authorization": "Bearer YOUR_KEY"})
res = json.load(urllib.request.urlopen(req))
print(res["data"]["name"], res["meta"]["verified"])Calculate
curl -X POST \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"passages":10}}' \
https://api.lekando.com/v1/tools/ae-tool-darb-toll-cost/calculate