Skip to content

Commit 14833f3

Browse files
committed
docs(api-server): update Source model to use embedded Language object
- Replace `language` field of type string with an embedded Language object - Add new Language model with `code`, `name`, and `nativeName` fields - Update existing models and sections to reflect the new Language object
1 parent 7160749 commit 14833f3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/content/docs/api-server/reference/core-models.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Represents a news publisher.
5555
- `description` (string): A brief description of the source.
5656
- `url` (string): The homepage URL of the source.
5757
- `sourceType` (string): The type of source (e.g., `newsAgency`, `blog`).
58-
- `language` (string): The primary language of the source (e.g., "en").
58+
- `language` (Language): The embedded language object.
5959
- `headquarters` (Country): The embedded country object where the source is based.
6060

6161
### Country
@@ -65,3 +65,11 @@ Represents a country.
6565
- `isoCode` (string): The two-letter ISO 3166-1 alpha-2 code (e.g., "US").
6666
- `name` (string): The common name of the country (e.g., "United States").
6767
- `flagUrl` (string): A URL to an image of the country's flag.
68+
69+
### Language
70+
71+
Represents a language.
72+
73+
- `code` (string): The ISO 639-1 code for the language (e.g., "en", "es").
74+
- `name` (string): The common name of the language (e.g., "English", "Spanish").
75+
- `nativeName` (string): The name of the language in its own tongue.

0 commit comments

Comments
 (0)