From e4579fad5df57d5dadcb1535f23359f6a34a444b Mon Sep 17 00:00:00 2001 From: umutcakirai Date: Fri, 10 Jul 2026 16:04:41 +0300 Subject: [PATCH] Fix TypeScript interface and Python example in README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three documentation inaccuracies, all independent of each other. 1. `media_id`, `image` and `gif_url` were typed `string | null`, but no record has a null in any of them (0/1324 each) and the JSON Schema declares all three as required, non-nullable strings — `image` and `gif_url` even carry path patterns. The optional type pushed needless null-handling onto every consumer. Narrowed to `string`. 2. `instruction_steps` was missing from the interface entirely, even though every record carries it and the field table documents it. Added, typed `string[]` per language. 3. The Python example stopped at Hindi, skipping Polish and Korean; the JavaScript example right below it lists both. Added the two lines. Docs only — no data or schema changes. --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b4a238..fc6cc5b 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,8 @@ print(ex["instructions"]["tr"]) # Turkish print(ex["instructions"]["ru"]) # Russian print(ex["instructions"]["zh"]) # Chinese print(ex["instructions"]["hi"]) # Hindi +print(ex["instructions"]["pl"]) # Polish +print(ex["instructions"]["ko"]) # Korean ``` ### Python — Load with Pandas @@ -406,12 +408,23 @@ interface Exercise { pl: string; ko: string; }; + instruction_steps: { + en: string[]; + es: string[]; + it: string[]; + tr: string[]; + ru: string[]; + zh: string[]; + hi: string[]; + pl: string[]; + ko: string[]; + }; muscle_group: string; secondary_muscles: string[]; target: string; - media_id: string | null; - image: string | null; - gif_url: string | null; + media_id: string; + image: string; + gif_url: string; attribution: string; created_at: string; }