2020-11-02 07:48:10 +00:00
|
|
|
// TO DO
|
|
|
|
// these should be imported from root config file
|
|
|
|
|
|
|
|
let BASE_URL = 'https://getbible.net';
|
|
|
|
let API_VERSION = 'v2';
|
|
|
|
|
2021-01-07 12:47:51 +00:00
|
|
|
export { BASE_URL, API_VERSION };
|
|
|
|
|
2020-11-02 07:48:10 +00:00
|
|
|
|
|
|
|
export default {
|
2021-01-08 15:16:47 +00:00
|
|
|
get_translations() {
|
2020-11-02 07:48:10 +00:00
|
|
|
return fetch(`${BASE_URL}/${API_VERSION}/translations.json`)
|
|
|
|
},
|
2021-01-08 15:16:47 +00:00
|
|
|
get_translation(abbreviation) {
|
2020-11-02 07:48:10 +00:00
|
|
|
return fetch(`${BASE_URL}/${API_VERSION}/${abbreviation}.json`)
|
|
|
|
}
|
|
|
|
}
|