ጥያቄዎችን ማቅረብ
ኤፒአይን ለመድረስ፣ ማድረግ ያለብዎት የኤችቲቲፒ GET ጥያቄን ወደ ትክክለኛው የመጨረሻ ነጥብ ማስገባት ብቻ ነው።
ለምሳሌ፣ የ available_translations.json የመጨረሻ ነጥብ ለመድረስ የሚከተለውን የጃቫስክሪፕት ወይም የcURL ትዕዛዝ መጠቀም ይችላሉ
ጃቫስክሪፕት
fetch(`https://bible.helloao.org/api/available_translations.json`)
.then(request => request.json())
.then(availableTranslations => {
console.log('The API has the following translations:', availableTranslations);
});cURL
curl https://bible.helloao.org/api/available_translations.jsonከታች የምሳሌዎች ዝርዝር ማግኘት ይችላሉ። ለተጨማሪ የተሟላ ሰነድ የማጣቀሻ ሰነዱን ይመልከቱ።
ምሳሌዎች
የሚገኙ ትርጉሞችን ዝርዝር ያግኙ
( ማጣቀሻ )
GET https://bible.helloao.org/api/available_translations.json
ጃቫስክሪፕት
fetch(`https://bible.helloao.org/api/available_translations.json`)
.then(request => request.json())
.then(availableTranslations => {
console.log('The API has the following translations:', availableTranslations);
});cURL
curl https://bible.helloao.org/api/available_translations.jsonበትርጉም ውስጥ መጽሐፍትን ዘርዝር
( ማጣቀሻ )
GET https://bible.helloao.org/api/{translation}/books.json
ጃቫስክሪፕት
// የቢኤስቢ ትርጉም የመጽሐፍት ዝርዝር ያግኙ
fetch(`https://bible.helloao.org/api/BSB/books.json`)
.then(request => request.json())
.then(books => {
console.log('The BSB has the following books:', books);
});cURL
curl https://bible.helloao.org/api/BSB/books.jsonከትርጉም አንድ ምዕራፍ ያግኙ
( ማጣቀሻ )
GET https://bible.helloao.org/api/{translation}/{book}/{chapter}.json
ጃቫስክሪፕት
// ዘፍጥረት 1ን ከቢኤስቢ ትርጉም ያግኙ
fetch(`https://bible.helloao.org/api/BSB/GEN/1.json`)
.then(request => request.json())
.then(chapter => {
console.log('Genesis 1 (BSB):', chapter);
});cURL
curl https://bible.helloao.org/api/BSB/GEN/1.jsonከትርጉም ቀለል ያለ ምዕራፍ ያግኙ
( ማጣቀሻ )
GET https://bible.helloao.org/api/{translation}/{book}/{chapter}.simple.json
የአንድ ምዕራፍ ጽሑፍ ብቻ ሲፈልጉ ይህንን ይጠቀሙ። እያንዳንዱ ጥቅስ የተቀረጸ ይዘት ዝርዝር ሳይሆን አንድ ነጠላ text ሕብረቁምፊ ይዟል፣ ስለዚህ ጽሑፉን እራስዎ መገንባት የለብዎትም።
ጃቫስክሪፕት
// የዘፍጥረት 1ን ጽሑፍ ከቢኤስቢ ትርጉም ያግኙ
fetch(`https://bible.helloao.org/api/BSB/GEN/1.simple.json`)
.then(request => request.json())
.then(chapter => {
for (let content of chapter.chapter.content) {
if (content.type === 'verse') {
console.log(`${content.number}. ${content.text}`);
}
}
});cURL
curl https://bible.helloao.org/api/BSB/GEN/1.simple.jsonየሚገኙ የአስተያየቶችን ዝርዝር ያግኙ
( ማጣቀሻ )
ጃቫስክሪፕት
fetch(`https://bible.helloao.org/api/available_commentaries.json`)
.then(request => request.json())
.then(availableCommentaries => {
console.log('The API has the following commentaries:', availableCommentaries);
});cURL
curl https://bible.helloao.org/api/available_commentaries.jsonመጽሐፍትን በአስተያየት ውስጥ ዘርዝር
( ማጣቀሻ )
ጃቫስክሪፕት
const commentary = 'adam-clarke';
// ለአዳም-ክላርክ አስተያየት የሚሆኑ የመጽሐፍት ዝርዝር ያግኙ
fetch(`https://bible.helloao.org/api/c/${commentary}/books.json`)
.then(request => request.json())
.then(books => {
console.log('The adam-clarke commentary has the following books:', books);
});cURL
curl https://bible.helloao.org/api/c/adam-clarke/books.jsonከአስተያየት አንድ ምዕራፍ ያግኙ
( ማጣቀሻ )
ጃቫስክሪፕት
const commentary = 'adam-clarke';
const book = 'GEN';
const chapter = 1;
// ዘፍጥረት 1ን ከአዳም-ክላርክ ሐተታ ያግኙ
fetch(`https://bible.helloao.org/api/c/${commentary}/${book}/${chapter}.json`)
.then(request => request.json())
.then(chapter => {
console.log('Genesis 1 (adam-clarke):', chapter);
});cURL
curl https://bible.helloao.org/api/c/adam-clarke/GEN/1.jsonመገለጫዎችን በአስተያየት ውስጥ ዘርዝር
( ማጣቀሻ )
ጃቫስክሪፕት
const commentary = 'tyndale';
// የቲንዴል አስተያየት የመገለጫዎችን ዝርዝር ያግኙ
fetch(`https://bible.helloao.org/api/c/${commentary}/profiles.json`)
.then(request => request.json())
.then(profiles => {
console.log('The tyndale commentary has the following profiles:', profiles);
});cURL
curl https://bible.helloao.org/api/c/tyndale/profiles.jsonበአስተያየት ውስጥ መገለጫ ያግኙ
( ማጣቀሻ )
ጃቫስክሪፕት
const commentary = 'tyndale';
const profile = 'aaron';
// የአሮንን መገለጫ ከቲንዴል አስተያየት ያግኙ
fetch(`https://bible.helloao.org/api/c/${commentary}/profiles/${profile}.json`)
.then(request => request.json())
.then(profile => {
console.log('The Aaron tyndale commentary profile:', profile);
});cURL
curl https://bible.helloao.org/api/c/tyndale/profiles/aaron.jsonየሚገኙ የውሂብ ስብስቦችን ዝርዝር ያግኙ
( ማጣቀሻ )
ጃቫስክሪፕት
fetch(`https://bible.helloao.org/api/available_datasets.json`)
.then(request => request.json())
.then(availableDatasets => {
console.log('The API has the following datasets:', availableDatasets);
});cURL
curl https://bible.helloao.org/api/available_datasets.jsonየመጽሐፍት ዝርዝርን በውሂብ ስብስብ ውስጥ ያግኙ
( ማጣቀሻ )
ጃቫስክሪፕት
const dataset = 'open-cross-ref';
// ለክፍት-መስቀል-ማጣቀሻ የውሂብ ስብስብ የመጽሐፍት ዝርዝር ያግኙ
fetch(`https://bible.helloao.org/api/d/${dataset}/books.json`)
.then(request => request.json())
.then(books => {
console.log('The open-cross-ref dataset has the following books:', books);
});cURL
curl https://bible.helloao.org/api/d/open-cross-ref/books.jsonከውሂብ ስብስብ አንድ ምዕራፍ ያግኙ
( ማጣቀሻ )
ጃቫስክሪፕት
const dataset = 'open-cross-ref';
const book = 'GEN';
const chapter = 1;
// ዘፍጥረት 1ን ከክፍት-መስቀል-ማጣቀሻ የውሂብ ስብስብ ያግኙ
fetch(`https://bible.helloao.org/api/d/${dataset}/${book}/${chapter}.json`)
.then(request => request.json())
.then(chapter => {
console.log('Genesis 1 (open-cross-ref):', chapter);
});cURL
curl https://bible.helloao.org/api/d/open-cross-ref/GEN/1.json