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.
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.
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.