bible

package
v0.0.0-...-acb6146 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package bible provides an API client to the bible-api.com API.

Index

Constants

View Source
const DefaultBaseURL = "https://bible-api.com"

DefaultBaseURL is the default base URL for the Kick API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for the IVR API.

func NewClient

func NewClient(baseURL string) *Client

NewClient creates a new Bible API client.

func NewDefaultClient

func NewDefaultClient() *Client

NewDefaultClient returns a new default Bible API client.

func (*Client) FetchVerses

func (c *Client) FetchVerses(verse string) (*GetVersesResponse, error)

FetchVerses fetches the verses matching a given verse query.

type GetVersesResponse

type GetVersesResponse struct {
	// Reference is the specific reference to the verse.
	// ex: "John 3:16"
	Reference string `json:"reference"`
	// Verses contains the specific verses returned.
	Verses []Verse `json:"verses"`
	// Text is the combined text of the returned verses.
	// ex: "For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life."
	Text string `json:"text"`
	// TranslationID is the short identifier of the translation used.
	// ex: "web"
	TranslationID string `json:"translation_id"`
	// TranslationName is the human-readable name of the translation used.
	// ex: "World English Bible"
	TranslationName string `json:"translation_name"`
	// TranslationNote contains notes about the translation used.
	// ex: "Public Domain"
	TranslationNote string `json:"translation_note"`
}

GetVersesResponse represents the response from the Bible API for a GetVerses request. https://bible-api.com/

type Verse

type Verse struct {
	// BookID is the short ID of the book.
	// ex: "JHN"
	BookID string `json:"book_id"`
	// BookName is the human-readable name of the book.
	// ex: "John"
	BookName string `json:"book_name"`
	// Chapter is the chapter of the verse.
	// ex: 3
	Chapter int `json:"chapter"`
	// Verse is the verse number.
	// ex: 16
	Verse int `json:"verse"`
	// Text is the text of the verse.
	// ex: "For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life."
	Text string `json:"text"`
}

Verse represents a specific verse from the Bible.

Directories

Path Synopsis
Package bibletest provides helpers for testing connections to the Bible API.
Package bibletest provides helpers for testing connections to the Bible API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL