const CONTENT = `Hello world`;
const PROJECT_ID = "<project_id>";
async function main() {
const body = {
title: "Hello World",
content_markdown: CONTENT,
project_id: PROJECT_ID,
};
const response = await fetch("https://api.campsite.com/v2/posts", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${Deno.env.get("CAMPBOT_API_KEY")}`,
},
body: JSON.stringify(body),
});
console.log(await response.json());
}
main();