Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions site/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const ghUrl = "https://github.com/GetTechAPI/TechAPI";

const endpoints = [
{ label: "/v1/smartphones", desc: "List all phones", href: `${base}v1/smartphones/index.json` },
{ label: "/v1/smartphones/{slug}", desc: "Phone detail + scores", href: `${base}v1/smartphones/galaxy-s25-ultra/index.json` },
{ label: "/v1/smartphones/{slug}/score", desc: "Computed scores", href: `${base}v1/smartphones/galaxy-s25-ultra/score/index.json` },
{ label: "/v1/smartphones/{slug}", desc: "Phone detail + scores", href: `${base}v1/smartphones/galaxy-s26-ultra/index.json` },
{ label: "/v1/smartphones/{slug}/score", desc: "Computed scores", href: `${base}v1/smartphones/galaxy-s26-ultra/score/index.json` },
{ label: "/v1/tablets", desc: "List all tablets", href: `${base}v1/tablets/index.json` },
{ label: "/v1/watches", desc: "List all watches", href: `${base}v1/watches/index.json` },
{ label: "/v1/pdas", desc: "List all PDAs", href: `${base}v1/pdas/index.json` },
{ label: "/v1/socs/{slug}", desc: "System-on-chip detail", href: `${base}v1/socs/snapdragon-8-elite/index.json` },
{ label: "/v1/socs/{slug}", desc: "System-on-chip detail", href: `${base}v1/socs/snapdragon-8-elite-gen-5/index.json` },
{ label: "/v1/gpus/{slug}", desc: "Discrete GPU detail", href: `${base}v1/gpus/geforce-rtx-5090/index.json` },
{ label: "/v1/cpus/{slug}", desc: "Desktop / laptop CPU", href: `${base}v1/cpus/core-i9-14900k/index.json` },
{ label: "/v1/brands", desc: "All brands", href: `${base}v1/brands/index.json` },
Expand Down Expand Up @@ -170,7 +170,7 @@ const endpoints = [
</div>
<div class="field grow">
<label for="pg-slug">Slug</label>
<input id="pg-slug" list="pg-slugs" autocomplete="off" spellcheck="false" placeholder="galaxy-s25-ultra" />
<input id="pg-slug" list="pg-slugs" autocomplete="off" spellcheck="false" placeholder="galaxy-s26-ultra" />
<datalist id="pg-slugs"></datalist>
</div>
<div class="field btns">
Expand All @@ -180,7 +180,7 @@ const endpoints = [
</div>
<div class="pg-reqline">
<span class="method">GET</span>
<code id="pg-url">/v1/smartphones/galaxy-s25-ultra</code>
<code id="pg-url">/v1/smartphones/galaxy-s26-ultra</code>
<span class="spacer"></span>
<span id="pg-status" class="status"></span>
<button id="pg-copy" class="copy">Copy curl</button>
Expand Down
10 changes: 5 additions & 5 deletions site/src/scripts/techapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ async function loadList(resource) {
if (!cmdEl) return;

const DEMOS = [
{ resource: "smartphones", slug: "galaxy-s25-ultra" },
{ resource: "socs", slug: "snapdragon-8-elite" },
{ resource: "smartphones", slug: "galaxy-s26-ultra" },
{ resource: "socs", slug: "snapdragon-8-elite-gen-5" },
{ resource: "gpus", slug: "geforce-rtx-5090" },
];
const reduce = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
Expand Down Expand Up @@ -556,15 +556,15 @@ document.getElementById("pg-copy")?.addEventListener("click", (e) => {
const b = e.currentTarget, p = b.textContent; b.textContent = "Copied ✓"; setTimeout(() => (b.textContent = p), 1200);
});
if (resSel) populateSlugs("smartphones").then((items) => {
slugIn.value = (items[0] && items[0].slug) || "galaxy-s25-ultra";
slugIn.value = (items[0] && items[0].slug) || "galaxy-s26-ultra";
run("smartphones", slugIn.value);
});

/* ============================================================
FEATURED DEVICES
============================================================ */
const PREFERRED = ["galaxy-s25-ultra", "iphone-16-pro-max", "pixel-9-pro",
"oneplus-13", "xiaomi-15-ultra", "galaxy-z-fold-6"];
const PREFERRED = ["galaxy-s26-ultra", "iphone-17-pro-max", "pixel-10-pro",
"oneplus-14", "xiaomi-15-ultra", "galaxy-z-fold-7"];

function bar(label, v) {
const w = v == null ? 0 : Math.round(v);
Expand Down
Loading