Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultHost is the default host for the client DefaultHost = "https://bible-api.com/" MaxRetryCount = 3 RetryWaitDuration = 5 * time.Second )
Variables ¶
View Source
var ValidStatus = []int{http.StatusOK, http.StatusAccepted}
Functions ¶
Types ¶
type BiBleResult ¶
type BiBleResult struct {
Reference string `json:"reference"`
Verses []struct {
BookID string `json:"book_id"`
BookName string `json:"book_name"`
Chapter int `json:"chapter"`
Verse int `json:"verse"`
Text string `json:"text"`
} `json:"verses"`
Text string `json:"text"`
TranslationID string `json:"translation_id"`
TranslationName string `json:"translation_name"`
TranslationNote string `json:"translation_note"`
}
type BibleClient ¶
type BibleClient struct {
// contains filtered or unexported fields
}
func NewBibleClient ¶
func NewBibleClient(wrapper middlewares.Wrapper) *BibleClient
func (*BibleClient) GetResult ¶
func (c *BibleClient) GetResult(book, chapter, verse string) (*BiBleResult, error)
func (*BibleClient) PutResult ¶
func (c *BibleClient) PutResult(result BiBleResult) (*BiBleResult, error)
Click to show internal directories.
Click to hide internal directories.