Fix TypeScript interface and Python example in README

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.
This commit is contained in:
umutcakirai
2026-07-10 16:04:41 +03:00
parent 118e4bd6b1
commit e4579fad5d
+16 -3
View File
@@ -333,6 +333,8 @@ print(ex["instructions"]["tr"]) # Turkish
print(ex["instructions"]["ru"]) # Russian print(ex["instructions"]["ru"]) # Russian
print(ex["instructions"]["zh"]) # Chinese print(ex["instructions"]["zh"]) # Chinese
print(ex["instructions"]["hi"]) # Hindi print(ex["instructions"]["hi"]) # Hindi
print(ex["instructions"]["pl"]) # Polish
print(ex["instructions"]["ko"]) # Korean
``` ```
### Python — Load with Pandas ### Python — Load with Pandas
@@ -406,12 +408,23 @@ interface Exercise {
pl: string; pl: string;
ko: 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; muscle_group: string;
secondary_muscles: string[]; secondary_muscles: string[];
target: string; target: string;
media_id: string | null; media_id: string;
image: string | null; image: string;
gif_url: string | null; gif_url: string;
attribution: string; attribution: string;
created_at: string; created_at: string;
} }