Free Use Bible API
Guida
Riferimento
SDK
GitHub
Dona
  • English
  • Afrikaans
  • አማርኛ
  • العربية
  • বাংলা
  • Deutsch
  • Español
  • Français
  • Hausa
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • 日本語
  • Português
  • Русский
  • Kiswahili
  • اردو
  • 简体中文
  • isiZulu
Guida
Riferimento
SDK
GitHub
Dona
  • English
  • Afrikaans
  • አማርኛ
  • العربية
  • বাংলা
  • Deutsch
  • Español
  • Français
  • Hausa
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • 日本語
  • Português
  • Русский
  • Kiswahili
  • اردو
  • 简体中文
  • isiZulu
  • Guida

    • Introduzione
    • Iniziare
    • Effettuare richieste
    • Download
    • Un modello biblico per la concessione di licenze alla Bibbia

Effettuare richieste

Per accedere all'API, è sufficiente effettuare una richiesta HTTP GET all'endpoint corretto.

Ad esempio, per accedere all'endpoint available_translations.json , è possibile utilizzare il seguente comando JavaScript o cURL:

JavaScript
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

Di seguito è riportato un elenco di esempi. Per una documentazione più completa, consultare la Documentazione di riferimento .

Esempi

Ottieni l'elenco delle traduzioni disponibili

( riferimento )

GET https://bible.helloao.org/api/available_translations.json

JavaScript
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

Elenco dei libri in traduzione

( riferimento )

GET https://bible.helloao.org/api/{translation}/books.json

JavaScript
// Ottieni l'elenco dei libri per la traduzione BSB
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

Ottieni un capitolo da una traduzione

( riferimento )

GET https://bible.helloao.org/api/{translation}/{book}/{chapter}.json

JavaScript
// Ottieni Genesi 1 dalla traduzione BSB
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

Ottieni un capitolo semplificato da una traduzione

( riferimento )

GET https://bible.helloao.org/api/{translation}/{book}/{chapter}.simple.json

Utilizza questa opzione quando desideri solo il testo di un capitolo. Ogni versetto contiene una singola stringa text anziché un elenco di contenuti formattati, quindi non è necessario costruire il testo manualmente.

JavaScript
// Ottieni il testo di Genesi 1 dalla traduzione BSB
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

Ottieni l'elenco dei commenti disponibili

( riferimento )

JavaScript
fetch-commentaries.js
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

Elenco dei libri in un commentario

( riferimento )

JavaScript
fetch-commentary-books.js
const commentary = 'adam-clarke';

// Ottieni l'elenco dei libri per il commentario di 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

Ottieni un capitolo da un commentario

( riferimento )

JavaScript
fetch-commentary-chapter.js
const commentary = 'adam-clarke';
const book = 'GEN';
const chapter = 1;

// Scarica Genesi 1 dal commentario di Adam Clarke
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

Elenca i profili in un commento

( riferimento )

JavaScript
fetch-commentary-profiles.js
const commentary = 'tyndale';

// Ottieni l'elenco dei profili per il commento di 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

Ottieni un profilo in un commento

( riferimento )

JavaScript
fetch-commentary-profile.js
const commentary = 'tyndale';
const profile = 'aaron';

// Ottieni il profilo di Aaron dal commento di Tyndale
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

Ottieni l'elenco dei set di dati disponibili

( riferimento )

JavaScript
fetch-datasets.js
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

Ottieni l'elenco dei libri in un dataset

( riferimento )

JavaScript
fetch-dataset-books.js
const dataset = 'open-cross-ref';

// Ottieni l'elenco dei libri per il 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

Ottieni un capitolo da un set di dati

( riferimento )

JavaScript
fetch-dataset-chapter.js
const dataset = 'open-cross-ref';
const book = 'GEN';
const chapter = 1;

// Ottieni Genesis 1 dal dataset open-cross-ref
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
Prev
Iniziare
Next
Download