Build Your Own Reader Interface
You can use the Artemis API to build your own reader interface.
This is useful if you want to design an interface yourself while having Artemis handle feed polling.
Here is an example of a code that you can use to build a custom JavaScript-powered Artemis interface:
<script>
fetch("https://artemis.jamesg.blog/api?token=YOUR_ARTEMIS_PRIVATE_KEY").then(response => response.json()).then(data => {
const feed = document.getElementById("feed");
feed.innerHTML = "";
for (const [date, posts] of Object.entries(data)) {
const dateHeader = document.createElement("h3");
dateHeader.textContent = new Date(date).toLocaleDateString();
feed.appendChild(dateHeader);
const postList = document.createElement("ul");
posts.forEach(post => {
const li = document.createElement("li");
const a = document.createElement("a");
a.href = post.url;
a.textContent = post.title;
li.appendChild(a);
postList.appendChild(li);
});
feed.appendChild(postList);
}
});
</script>
<ul id="feed">Loading...</ul>
Above, replace YOUR_ARTEMIS_PRIVATE_KEY with your Artemis private key. This is available in your Account Developer Settings.
You should only use this code on a web page that only you can access (i.e. a new tab page, a local HTML file, a private page on your website). This is because your Artemis private key gives full access to your Artemis account.