fetch

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	HOST = "https://4.dbt.io/api/"
)

Variables

This section is empty.

Functions

func HttpGet

func HttpGet(ctx context.Context, url string, desc string) ([]byte, *log.Status)

Types

type APIDBPClient

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

func NewAPIDBPClient

func NewAPIDBPClient(ctx context.Context, bibleId string) APIDBPClient

func (*APIDBPClient) BibleInfo

func (d *APIDBPClient) BibleInfo() (BibleInfoType, *log.Status)

func (*APIDBPClient) FindFilesets

func (d *APIDBPClient) FindFilesets(info *BibleInfoType, audio request.BibleBrainAudio,
	text request.BibleBrainText, testament request.Testament)

func (*APIDBPClient) UpdateIdent

func (d *APIDBPClient) UpdateIdent(id db.Ident, info BibleInfoType, req request.Request) (db.Ident, *log.Status)

type APIDBPTimestamps

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

func NewAPIDBPTimestamps

func NewAPIDBPTimestamps(conn db.DBAdapter, audioId string) APIDBPTimestamps

func (*APIDBPTimestamps) HavingTimestamps

func (a *APIDBPTimestamps) HavingTimestamps() (map[string]bool, *log.Status)

func (*APIDBPTimestamps) LoadTimestamps

func (a *APIDBPTimestamps) LoadTimestamps(testament request.Testament) (bool, *log.Status)

func (*APIDBPTimestamps) Timestamps

func (a *APIDBPTimestamps) Timestamps(bookId string, chapter int) ([]Timestamp, *log.Status)

type APIDownloadClient

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

func NewAPIDownloadClient

func NewAPIDownloadClient(ctx context.Context, bibleId string, testament request.Testament) APIDownloadClient

func (*APIDownloadClient) Download

func (d *APIDownloadClient) Download(info BibleInfoType) *log.Status

type AlphabetType

type AlphabetType struct {
	Alphabet string `json:"script"`
}

type BibleInfoRespType

type BibleInfoRespType struct {
	Data BibleInfoType `json:"data"`
}

type BibleInfoType

type BibleInfoType struct {
	BibleId            string       `json:"abbr"`
	LanguageISO        string       `json:"iso"`
	LanguageId         int          `json:"language_id"`
	RolvId             string       `json:"language_rolv_code"`
	LanguageName       string       `json:"language"`
	VersionName        string       `json:"name"`
	Alphabet           AlphabetType `json:"alphabet"` // alphabet.script
	Copyright          string       `json:"mark"`
	Books              []BooksType  `json:"books"`
	DbpProd            DbpProdType  `json:"filesets"`
	VersionCode        string
	AudioOTFileset     FilesetType
	AudioNTFileset     FilesetType
	TextOTPlainFileset FilesetType
	TextNTPlainFileset FilesetType
	TextOTUSXFileset   FilesetType
	TextNTUSXFileset   FilesetType
}

type BooksType

type BooksType struct {
	BookId    string `json:"book_id"`
	Name      string `json:"name"`
	Chapters  []int  `json:"chapters"`
	BookSeq   string `json:"book_seq"`
	Testament string `json:"testament"`
}

type DbpProdType

type DbpProdType struct {
	Filesets []FilesetType `json:"dbp-prod"`
}

type FilesetType

type FilesetType struct {
	Id        string `json:"id"`
	Type      string `json:"type"`
	Size      string `json:"size"`
	Codec     string `json:"codec"`
	Container string `json:"container"`
	Bitrate   string `json:"bitrate"`
}

type LocationDownloadRec

type LocationDownloadRec struct {
	Data []LocationRec `json:"data"`
	Meta any           `json:"meta"`
}

type LocationRec

type LocationRec struct {
	BookId   string `json:"book_id"`
	BookName string `json:"book_name"`
	Chapter  int    `json:"chapter_start"`
	Verse    int    `json:"verse_start"`
	URL      string `json:"path"`
	FileSize int    `json:"filesize_in_bytes"`
	Filename string
}

type Timestamp

type Timestamp struct {
	BookId        string  `json:"book"`
	Chapter       string  `json:"chapter"`
	VerseStart    string  `json:"verse_start"`
	VerseStartAlt string  `json:"verse_start_alt"`
	Timestamp     float64 `json:"timestamp"`
}

func (*Timestamp) Key

func (t *Timestamp) Key() string

type TimestampsResp

type TimestampsResp struct {
	Data []Timestamp `json:"data"`
}

Jump to

Keyboard shortcuts

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