From b80fc08a62e46a42ef73093008895c09a0e65195 Mon Sep 17 00:00:00 2001 From: David Parsley Date: Thu, 19 Oct 2023 12:37:14 -0400 Subject: [PATCH] Update block_video.go No harm, definitely useful. Co-authored-by: Ben Bourdin --- block_video.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/block_video.go b/block_video.go index 767565b40..69a8d740c 100644 --- a/block_video.go +++ b/block_video.go @@ -33,3 +33,33 @@ func NewVideoBlock(videoURL, thumbnailURL, altText, blockID string, title *TextB Title: title, } } + +// WithAuthorName sets the author name for the VideoBlock +func (s *VideoBlock) WithAuthorName(authorName string) *VideoBlock { + s.AuthorName = authorName + return s +} + +// WithTitleURL sets the title URL for the VideoBlock +func (s *VideoBlock) WithTitleURL(titleURL string) *VideoBlock { + s.TitleURL = titleURL + return s +} + +// WithDescription sets the description for the VideoBlock +func (s *VideoBlock) WithDescription(description *slack.TextBlockObject) *VideoBlock { + s.Description = description + return s +} + +// WithProviderIconURL sets the provider icon URL for the VideoBlock +func (s *VideoBlock) WithProviderIconURL(providerIconURL string) *VideoBlock { + s.ProviderIconURL = providerIconURL + return s +} + +// WithProviderName sets the provider name for the VideoBlock +func (s *VideoBlock) WithProviderName(providerName string) *VideoBlock { + s.ProviderName = providerName + return s +}