You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/requests/getLanguages.tsx

36 lines
615 B

import {
DATA_URL,
PROCEDURES,
} from 'config'
import { callApi } from 'helpers'
const proc = PROCEDURES.get_languages
export type ReferenceLanguage = {
id: number,
iso_639_1: string,
lexic: number,
name_en: string,
name_national: string | null,
name_ru: string,
short_name: string,
ts: number,
}
export type ReferenceLanguages = Array<ReferenceLanguage>
export const getLanguages = async (): Promise<ReferenceLanguages> => {
const config = {
body: {
params: {},
proc,
},
}
const response = await callApi({
config,
url: DATA_URL,
})
return response
}