ost

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseURL = `https://openscripture.today`

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client       *http.Client
	TextService  *text.Service
	PhotoService *photo.Service
	BaseURL      string
}

func New

func New(ctx context.Context) (*Client, error)

func (*Client) Today

func (c *Client) Today(opts ...Option) (string, error)

func (*Client) TodayHTML

func (c *Client) TodayHTML(opts ...Option) (template.HTML, error)

func (*Client) TodayPhoto added in v0.3.0

func (c *Client) TodayPhoto(opts ...Option) (*photo.Info, error)

func (*Client) TodayVerse

func (c *Client) TodayVerse(opts ...Option) (*Verse, error)

type Option added in v0.2.0

type Option func(*options)

func On added in v0.2.0

func On(t time.Time) Option

type Verse

type Verse struct {
	Reference string        `yaml:"reference"`
	Content   template.HTML `yaml:"content"`
	Version
}

Verse is the metadata and content for a verse of the day.

type Version

type Version struct {
	Name string `yaml:"name"`
	Link string `yaml:"link"`
}

Version is the metadata for the version of the Bible used for the verse.

Jump to

Keyboard shortcuts

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