4
2
mirror of https://github.com/getbible/app.git synced 2024-06-04 03:30:47 +00:00
app/src/api/getbible_v2_api.js
2021-01-08 17:16:47 +02:00

17 lines
393 B
JavaScript

// TO DO
// these should be imported from root config file
let BASE_URL = 'https://getbible.net';
let API_VERSION = 'v2';
export { BASE_URL, API_VERSION };
export default {
get_translations() {
return fetch(`${BASE_URL}/${API_VERSION}/translations.json`)
},
get_translation(abbreviation) {
return fetch(`${BASE_URL}/${API_VERSION}/${abbreviation}.json`)
}
}