4
2
Fork 0
app/src/api/getbible_v2_api.js

17 lines
393 B
JavaScript
Raw Normal View History

// 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 {
2021-01-08 15:16:47 +00:00
get_translations() {
return fetch(`${BASE_URL}/${API_VERSION}/translations.json`)
},
2021-01-08 15:16:47 +00:00
get_translation(abbreviation) {
return fetch(`${BASE_URL}/${API_VERSION}/${abbreviation}.json`)
}
}