Request the list of available source languages. :param skip_cache: Deprecated, and now has no effect as the corresponding internal functionality has been removed. This parameter will be removed in a future version. :return: List of supported source languages.
(self, skip_cache: bool = False)
| 968 | return response |
| 969 | |
| 970 | def get_source_languages(self, skip_cache: bool = False) -> List[Language]: |
| 971 | """Request the list of available source languages. |
| 972 | |
| 973 | :param skip_cache: Deprecated, and now has no effect as the |
| 974 | corresponding internal functionality has been removed. This |
| 975 | parameter will be removed in a future version. |
| 976 | :return: List of supported source languages. |
| 977 | """ |
| 978 | status, content, json = self._api_call("v2/languages", method="GET") |
| 979 | self._raise_for_status(status, content, json) |
| 980 | languages = json if (json and isinstance(json, list)) else [] |
| 981 | return [ |
| 982 | Language( |
| 983 | language["language"], |
| 984 | language["name"], |
| 985 | ) |
| 986 | for language in languages |
| 987 | ] |
| 988 | |
| 989 | def get_target_languages(self, skip_cache: bool = False) -> List[Language]: |
| 990 | """Request the list of available target languages. |