Documentation
¶
Index ¶
- type APIClient
- func (c *APIClient) GetAlbumTracks(albumId string) ([]Item, error)
- func (c *APIClient) GetAlbums(year int) ([]Item, error)
- func (c *APIClient) GetHVHEGlobalStats() (*GlobalStats, error)
- func (c *APIClient) GetLanguages() ([]Overview, error)
- func (c *APIClient) GetPodcastTracks(podcastTag string, limit int) ([]Item, error)
- func (c *APIClient) GetYears() ([]Year, error)
- func (c *APIClient) HVHEGameNight(churchUID uuid.UUID, winner string, gameNightNumber int, units int) error
- func (c *APIClient) HVHEGameNight3(winner string, units int) error
- func (c *APIClient) HVHENotifications(churchUID uuid.UUID, winner string, gameNightNumber int) error
- func (c *APIClient) SetBaseURL(baseURL string) *APIClient
- func (c *APIClient) SetDebug(debug bool) *APIClient
- func (c *APIClient) SetLogger(logger *slog.Logger) *APIClient
- func (c *APIClient) SubmitAnswer(QuestionID string, AnsweredCorrectly bool, SelectedAnswerID string, ...) error
- type GlobalStats
- type HVHEGameNight3Request
- type HVHEGameNightRequest
- type HVHENotificationsRequest
- type ID
- type Item
- type Meta
- type Overview
- type QuestionAnswerRequest
- type Token
- type Year
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
func NewApiClient ¶
NewApiClient creates a new BMM API client, using the provided token
It sets the language to norwegian. There is currently no way to change this. PRs welcome :).
func (*APIClient) GetAlbumTracks ¶
func (*APIClient) GetHVHEGlobalStats ¶ added in v0.1.2
func (c *APIClient) GetHVHEGlobalStats() (*GlobalStats, error)
func (*APIClient) GetLanguages ¶
func (*APIClient) GetPodcastTracks ¶
func (*APIClient) HVHEGameNight ¶ added in v0.1.2
func (*APIClient) HVHEGameNight3 ¶ added in v0.1.8
func (*APIClient) HVHENotifications ¶ added in v0.1.2
func (*APIClient) SetBaseURL ¶
type GlobalStats ¶ added in v0.1.2
type HVHEGameNight3Request ¶ added in v0.1.8
type HVHEGameNightRequest ¶ added in v0.1.2
type HVHENotificationsRequest ¶ added in v0.1.2
type Item ¶
type Item struct { Meta Meta `json:"_meta"` BmmID interface{} `json:"bmm_id"` Cover string `json:"cover"` ID int `json:"id"` Languages []string `json:"languages"` //ParentID interface{} `json:"parent_id"` PublishedAt time.Time `json:"published_at"` Tags []string `json:"tags"` Language string `json:"language"` Title string `json:"title"` Type string `json:"type"` Tracks []Item `json:"children"` TranscriptionLanguages []string `json:"transcription_languages"` HasTranscription bool `json:"has_transcription"` }
type QuestionAnswerRequest ¶ added in v0.1.4
type Token ¶
type Token struct { AccessToken string `json:"access_token"` Scope string `json:"scope"` ExpiresIn int `json:"expires_in"` TokenType string `json:"token_type"` CreatedAt time.Time // contains filtered or unexported fields }
func (*Token) GetAccessToken ¶
GetAccessToken returns the access token, if it is expired, it will be refreshed automatically
Click to show internal directories.
Click to hide internal directories.