API Client - eliranwong/UniqueBible GitHub Wiki
API Client
API client is one the of running modes that UniqueBible App supports.
It is designed to offer users quick online access to bible resources without installing individual modules locally.
API Documentation
The API-client takes UniqueBible App commands as input.
For UniqueBible App commands, visit https://github.com/eliranwong/UniqueBibleAPI
Retrieve Content with a single Reuqest
To retrieve content with a single request, append an UniqueBible App command to the command ubapi
For example,
ubapi John 3:16
Work with Stdin and Stdout
api-client
modes support working with standard input and output, e.g.
echo "John 3:16" | ubapi bible:::NET::: | ubapi crossreference:::
Retrieve Content with multiple requests
Run ubapi
without specifying a command, to launch a multiple-turn prompt session:
ubapi
Enter an UniqueBible App command to retrieve content in each turn.
After you finish, use key combo Ctrl+Q
or entering .quit
to exit.
Remarks: Command suggestions are enabled only in multiple-turn prompt session.
Configurations
Three configurations in config.py
relates to the use of the api-client
mode:
web_api_endpoint
specifies the web api endpoint. Default: 'https://bible.gospelchurch.uk/plain'
web_api_timeout
specifies the time out value for connecting the endpoint. Default: 10
web_api_private
specifies the private key to get access to the private content installed in the endpoint. Default: ''