Diggama is a headless CMS that provides:
https://api.diggama.com/v1)https://api.diggama.com/v1/here.js)// Endpoint: GET https://api.diggama.com/v1/resources/articlequiversphere
// Required headers:
{
'Accept': 'application/json',
'Authorization': 'Bearer DIGGAMA_TOKEN'
}
// Response structure
interface Article {
id: string;
attributes: {
headline: string;
description: string;
content: string;
date: string;
author: string;
authorjob: string;
category: string;
}
}
Articles are individually accessible via their ID using the same endpoint. The system uses Astro for static page generation.
class DiggamaClient {
constructor(token: string);
// Forms handling
form(
form: HTMLFormElement,
resource: string,
onSuccess: () => void,
onError: (error: any) => void
): void;
}
Contact Form
// Endpoint: POST https://api.diggama.com/v1/resources/contact
interface ContactForm {
firstname: string;
lastname: string;
company?: string;
email: string;
message: string;
}
Application Form
// Endpoint: POST https://api.diggama.com/v1/resources/candidatures
interface ApplicationForm {
firstname: string;
lastname: string;
company: string;
email: string;
telephone: string;
description: string;
team: string;
motivation: string;
}
Bearer TOKENDIGGAMA_TOKEN<script
src="https://api.diggama.com/v1/here.js"
x-diggama-token="YOUR_TOKEN"
async
/>
Security
Performance
Error Handling
/v1/resources/articlequiversphere: Articles management/v1/resources/contact: Contact form/v1/resources/candidatures: Application formThe CMS integrates seamlessly with:
import { DiggamaClient } from '@diggama/client';
const client = new DiggamaClient(process.env.DIGGAMA_TOKEN);
// Contact form example
diggamaClient.form(
document.getElementById('contact-form'),
"contact",
() => {
alert("Thank you for your message");
form.reset();
},
() => alert("An error occurred while sending your message. Please try again later.")
);
const response = await fetch('https://api.diggama.com/v1/resources/articlequiversphere', {
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer ' + process.env.DIGGAMA_TOKEN
}
});
const articles = await response.json();
Required environment variables for the CMS:
DIGGAMA_TOKEN=your_api_token
For additional support or questions: