Skip to content

Commit 0170696

Browse files
committed
feat(site): expose mobile device collections
Refs #1
1 parent 110c8aa commit 0170696

10 files changed

Lines changed: 1017 additions & 5 deletions

File tree

site/public/openapi.json

Lines changed: 722 additions & 0 deletions
Large diffs are not rendered by default.

site/public/v1/index.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313
"count": 31671,
1414
"url": "/v1/smartphones/index.json"
1515
},
16+
"tablets": {
17+
"count": 1,
18+
"url": "/v1/tablets/index.json"
19+
},
20+
"watches": {
21+
"count": 1,
22+
"url": "/v1/watches/index.json"
23+
},
24+
"pdas": {
25+
"count": 1,
26+
"url": "/v1/pdas/index.json"
27+
},
1628
"gpus": {
1729
"count": 2030,
1830
"url": "/v1/gpus/index.json"

site/public/v1/pdas/index.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"count": 1,
3+
"results": [
4+
{
5+
"slug": "ipaq-h3600-base",
6+
"name": "HP iPAQ H3600",
7+
"url": "/v1/pdas/ipaq-h3600-base"
8+
}
9+
]
10+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"id": 1,
3+
"slug": "ipaq-h3600-base",
4+
"base_model_slug": "ipaq-h3600",
5+
"name": "HP iPAQ H3600",
6+
"brand": {
7+
"id": 160,
8+
"slug": "hp",
9+
"name": "HP",
10+
"country": "US",
11+
"url": "/v1/brands/hp"
12+
},
13+
"soc": null,
14+
"release_date": "2000-04-01",
15+
"msrp_usd": null,
16+
"ram_gb": 0.032,
17+
"storage_options_gb": [],
18+
"variant": {
19+
"region": "global",
20+
"model_numbers": [
21+
"H3600"
22+
],
23+
"memory": {
24+
"ram_gb": 0.032
25+
},
26+
"network": {
27+
"cellular": "none"
28+
},
29+
"sim": "none"
30+
},
31+
"display": {
32+
"size_inch": 3.8,
33+
"resolution": "240x320",
34+
"type": "TFT LCD"
35+
},
36+
"cameras": [],
37+
"battery_mah": 950,
38+
"charging_wired_w": null,
39+
"charging_wireless_w": null,
40+
"weight_g": 170.0,
41+
"dimensions": {
42+
"height_mm": 130,
43+
"width_mm": 84,
44+
"depth_mm": 16
45+
},
46+
"ip_rating": null,
47+
"os": "Pocket PC",
48+
"os_version": null,
49+
"connectivity": {},
50+
"image_url": null,
51+
"images": [],
52+
"verified": false,
53+
"source_urls": [
54+
"https://en.wikipedia.org/wiki/IPAQ"
55+
],
56+
"created_at": "2026-06-20T06:11:29.264530",
57+
"updated_at": "2026-06-20T06:11:29.264530",
58+
"url": "/v1/pdas/ipaq-h3600-base"
59+
}

site/public/v1/tablets/index.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"count": 1,
3+
"results": [
4+
{
5+
"slug": "ipad-pro-11-m4-wifi-8gb-256gb",
6+
"name": "iPad Pro 11-inch (M4, Wi-Fi, 8GB/256GB)",
7+
"url": "/v1/tablets/ipad-pro-11-m4-wifi-8gb-256gb"
8+
}
9+
]
10+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"id": 1,
3+
"slug": "ipad-pro-11-m4-wifi-8gb-256gb",
4+
"base_model_slug": "ipad-pro-11-m4",
5+
"name": "iPad Pro 11-inch (M4, Wi-Fi, 8GB/256GB)",
6+
"brand": {
7+
"id": 149,
8+
"slug": "apple",
9+
"name": "Apple",
10+
"country": "US",
11+
"url": "/v1/brands/apple"
12+
},
13+
"soc": null,
14+
"release_date": "2024-05-15",
15+
"msrp_usd": 999,
16+
"ram_gb": 8.0,
17+
"storage_options_gb": [
18+
256
19+
],
20+
"variant": {
21+
"region": "global",
22+
"model_numbers": [
23+
"A2836"
24+
],
25+
"memory": {
26+
"ram_gb": 8,
27+
"storage_gb": 256
28+
},
29+
"network": {
30+
"cellular": "none",
31+
"carrier": "wifi-only"
32+
},
33+
"sim": "none"
34+
},
35+
"display": {
36+
"size_inch": 11.0,
37+
"resolution": "2420x1668",
38+
"refresh_hz": 120,
39+
"type": "Ultra Retina XDR OLED"
40+
},
41+
"cameras": [
42+
{
43+
"type": "main",
44+
"mp": 12
45+
},
46+
{
47+
"type": "selfie",
48+
"mp": 12
49+
}
50+
],
51+
"battery_mah": 8160,
52+
"charging_wired_w": null,
53+
"charging_wireless_w": null,
54+
"weight_g": 444.0,
55+
"dimensions": {
56+
"height_mm": 249.7,
57+
"width_mm": 177.5,
58+
"depth_mm": 5.3
59+
},
60+
"ip_rating": null,
61+
"os": "iPadOS",
62+
"os_version": "17.5",
63+
"connectivity": {
64+
"wifi": "Wi-Fi 6E",
65+
"bluetooth": "5.3",
66+
"usb": "USB-C"
67+
},
68+
"image_url": null,
69+
"images": [],
70+
"verified": false,
71+
"source_urls": [
72+
"https://support.apple.com/en-us/119891"
73+
],
74+
"created_at": "2026-06-20T06:11:29.239602",
75+
"updated_at": "2026-06-20T06:11:29.239602",
76+
"url": "/v1/tablets/ipad-pro-11-m4-wifi-8gb-256gb"
77+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"id": 1,
3+
"slug": "galaxy-watch-global-bluetooth-42mm",
4+
"base_model_slug": "galaxy-watch",
5+
"name": "Galaxy Watch (Bluetooth, 42mm)",
6+
"brand": {
7+
"id": 113,
8+
"slug": "samsung",
9+
"name": "Samsung",
10+
"country": "KR",
11+
"url": "/v1/brands/samsung"
12+
},
13+
"soc": {
14+
"id": 1902,
15+
"slug": "exynos-9110",
16+
"name": "Exynos 9110",
17+
"manufacturer": {
18+
"slug": "samsung",
19+
"name": "Samsung",
20+
"url": "/v1/brands/samsung"
21+
},
22+
"process_nm": 10.0,
23+
"gpu_name": "Mali-T720",
24+
"url": "/v1/socs/exynos-9110"
25+
},
26+
"release_date": "2018-08-24",
27+
"msrp_usd": 329,
28+
"ram_gb": 0.75,
29+
"storage_options_gb": [
30+
4
31+
],
32+
"variant": {
33+
"region": "global",
34+
"model_numbers": [
35+
"SM-R810"
36+
],
37+
"memory": {
38+
"ram_gb": 0.75,
39+
"storage_gb": 4
40+
},
41+
"network": {
42+
"cellular": "none",
43+
"carrier": "bluetooth-only"
44+
},
45+
"sim": "none"
46+
},
47+
"display": {
48+
"size_inch": 1.2,
49+
"resolution": "360x360",
50+
"type": "Super AMOLED"
51+
},
52+
"cameras": [],
53+
"battery_mah": 270,
54+
"charging_wired_w": null,
55+
"charging_wireless_w": null,
56+
"weight_g": 49.0,
57+
"dimensions": {
58+
"height_mm": 45.7,
59+
"width_mm": 41.9,
60+
"depth_mm": 12.7
61+
},
62+
"ip_rating": "IP68",
63+
"os": "Tizen",
64+
"os_version": "4.0",
65+
"connectivity": {
66+
"wifi": "802.11 b/g/n",
67+
"bluetooth": "4.2",
68+
"nfc": true
69+
},
70+
"image_url": null,
71+
"images": [],
72+
"verified": false,
73+
"source_urls": [
74+
"https://www.samsung.com/us/support/answer/ANS00078020/"
75+
],
76+
"created_at": "2026-06-20T06:11:29.252062",
77+
"updated_at": "2026-06-20T06:11:29.252062",
78+
"url": "/v1/watches/galaxy-watch-global-bluetooth-42mm"
79+
}

site/public/v1/watches/index.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"count": 1,
3+
"results": [
4+
{
5+
"slug": "galaxy-watch-global-bluetooth-42mm",
6+
"name": "Galaxy Watch (Bluetooth, 42mm)",
7+
"url": "/v1/watches/galaxy-watch-global-bluetooth-42mm"
8+
}
9+
]
10+
}

site/src/pages/index.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ const endpoints = [
99
{ label: "/v1/smartphones", desc: "List all phones", href: `${base}v1/smartphones/index.json` },
1010
{ label: "/v1/smartphones/{slug}", desc: "Phone detail + scores", href: `${base}v1/smartphones/galaxy-s25-ultra/index.json` },
1111
{ label: "/v1/smartphones/{slug}/score", desc: "Computed scores", href: `${base}v1/smartphones/galaxy-s25-ultra/score/index.json` },
12+
{ label: "/v1/tablets", desc: "List all tablets", href: `${base}v1/tablets/index.json` },
13+
{ label: "/v1/watches", desc: "List all watches", href: `${base}v1/watches/index.json` },
14+
{ label: "/v1/pdas", desc: "List all PDAs", href: `${base}v1/pdas/index.json` },
1215
{ label: "/v1/socs/{slug}", desc: "System-on-chip detail", href: `${base}v1/socs/snapdragon-8-elite/index.json` },
1316
{ label: "/v1/gpus/{slug}", desc: "Discrete GPU detail", href: `${base}v1/gpus/geforce-rtx-5090/index.json` },
1417
{ label: "/v1/cpus/{slug}", desc: "Desktop / laptop CPU", href: `${base}v1/cpus/core-i9-14900k/index.json` },
@@ -155,6 +158,9 @@ const endpoints = [
155158
<label for="pg-resource">Resource</label>
156159
<select id="pg-resource">
157160
<option value="smartphones">smartphones</option>
161+
<option value="tablets">tablets</option>
162+
<option value="watches">watches</option>
163+
<option value="pdas">pdas</option>
158164
<option value="socs">socs</option>
159165
<option value="gpus">gpus</option>
160166
<option value="cpus">cpus</option>

site/src/scripts/techapi.js

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,17 @@ async function loadList(resource) {
148148
(function stats() {
149149
const el = document.getElementById("stats");
150150
if (!el) return;
151-
const order = ["smartphones", "socs", "gpus", "cpus", "brands"];
152-
const label = { smartphones: "phones", socs: "socs", gpus: "gpus", cpus: "cpus", brands: "brands" };
151+
const order = ["smartphones", "tablets", "watches", "pdas", "socs", "gpus", "cpus", "brands"];
152+
const label = {
153+
smartphones: "phones",
154+
tablets: "tablets",
155+
watches: "watches",
156+
pdas: "pdas",
157+
socs: "socs",
158+
gpus: "gpus",
159+
cpus: "cpus",
160+
brands: "brands",
161+
};
153162
getJSON("v1/index.json").then((m) => {
154163
el.innerHTML = "";
155164
for (const k of order) {
@@ -195,9 +204,27 @@ function countUp(node, target) {
195204
const listEl = document.getElementById("history-list");
196205
if (!totalEl || !countsEl || !chartEl || !listEl) return;
197206

198-
const order = ["smartphones", "socs", "gpus", "cpus", "brands"];
199-
const label = { smartphones: "Phones", socs: "SoCs", gpus: "GPUs", cpus: "CPUs", brands: "Brands" };
200-
const shortLabel = { smartphones: "phones", socs: "socs", gpus: "gpus", cpus: "cpus", brands: "brands" };
207+
const order = ["smartphones", "tablets", "watches", "pdas", "socs", "gpus", "cpus", "brands"];
208+
const label = {
209+
smartphones: "Phones",
210+
tablets: "Tablets",
211+
watches: "Watches",
212+
pdas: "PDAs",
213+
socs: "SoCs",
214+
gpus: "GPUs",
215+
cpus: "CPUs",
216+
brands: "Brands",
217+
};
218+
const shortLabel = {
219+
smartphones: "phones",
220+
tablets: "tablets",
221+
watches: "watches",
222+
pdas: "pdas",
223+
socs: "socs",
224+
gpus: "gpus",
225+
cpus: "cpus",
226+
brands: "brands",
227+
};
201228
const dumpPath = "site/public/v1/index.json";
202229
const countRows = (manifest) => order
203230
.map((key) => ({ key, count: manifest.collections?.[key]?.count }))

0 commit comments

Comments
 (0)