Soft Hours Diary logoSoft Hours Diary / Docs
API HomePlayground ↗GitHub ↗
Copy / Open with AI ▾
Export this guide
Download full AI context (.md)
Continue with an AI assistant
SOFT HOURS DIARY · DEVELOPER DOCUMENTATION

CDN API Documentation

Build production-ready interfaces with simple asset IDs. Learn the URL model, choose an integration and test real CDN files in the browser.

Public CDNJavaScript helper v1.0.0No API key required

What this CDN provides

Soft Hours Diary hosts public emoji and country-flag image files through stable, direct URLs. The JavaScript helper converts a short type, quality and ID into the right image URL, so an application does not need to remember every folder rule.

Static asset service, not a REST data API. There is no dynamic JSON search endpoint, API key or authentication header required for ordinary image display.

The URL model

Every helper uses the same basic contract:

const url = SoftHoursDiary.getUrl({
  type: "emoji",
  quality: "svg",
  id: "1f632"
});

// Returns an absolute CDN URL.

The type selects an asset family. Quality selects its format or size. ID identifies a file. The helper returns a URL without making a network request.

Use it in a browser

<script defer src="https://softhoursdiary-emojis.pages.dev/soft-hours-diary.js"></script>

<shd-asset type="emoji" asset-id="1f632"
  quality="svg" alt="Surprised face"></shd-asset>

<shd-flag asset-id="IN" quality="l"
  alt="Flag of India"></shd-flag>

Specialised tags are shd-emoji, shd-flag and shd-flag-icon. The generic shd-asset accepts a type attribute.

Choose your integration guide

Complete documentation library

Open a focused guide for the exact part of your integration. Each page includes code examples, page export controls and AI handoff links.

Important behaviour and limits

  • URL generation is local and synchronous; it does not verify file existence.
  • Use the documented filename casing and quality values.
  • Normal img display does not need JavaScript CORS access.
  • JavaScript fetch() and canvas pixel access have separate cross-origin rules.
  • The prepared npm metadata does not mean the package is published.
  • Robots rules are crawler instructions, not access control.
© 2026 Soft Hours Diary · Little things, deep feelings. · AI context