SDKs

There are no official SDKs yet. The API is small enough to call directly.

curl

bash$
curl https://dineharbor.com/api/v1/branch \
  -H "Authorization: Bearer $DH_API_KEY"

fetch

ts$
const res = await fetch("https://dineharbor.com/api/v1/branch", {
  headers: { Authorization: `Bearer ${process.env.DH_API_KEY}` },
});

if (!res.ok) {
  const { message } = await res.json();
  throw new Error(message);
}

const branch = await res.json();

PHP

php$
$response = Http::withToken(config('services.dineharbor.key'))
    ->get('https://dineharbor.com/api/v1/branch');

$branch = $response->json();

If we ship an official client library, it will be linked from this page.