comment

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WithParts      = common.WithParts[*Comment]
	WithOutput     = common.WithOutput[*Comment]
	WithService    = common.WithService[*Comment]
	WithIds        = common.WithIds[*Comment]
	WithMaxResults = common.WithMaxResults[*Comment]
	WithChannelId  = common.WithChannelId[*Comment]
)

Functions

This section is empty.

Types

type Comment

type Comment struct {
	*common.Fields
	AuthorChannelId  string `yaml:"author_channel_id" json:"author_channel_id,omitempty"`
	CanRate          *bool  `yaml:"can_rate" json:"can_rate,omitempty"`
	ParentId         string `yaml:"parent_id" json:"parent_id,omitempty"`
	TextFormat       string `yaml:"text_format" json:"text_format,omitempty"`
	TextOriginal     string `yaml:"text_original" json:"text_original,omitempty"`
	ModerationStatus string `yaml:"moderation_status" json:"moderation_status,omitempty"`
	BanAuthor        *bool  `yaml:"ban_author" json:"ban_author,omitempty"`
	VideoId          string `yaml:"video_id" json:"video_id,omitempty"`
	ViewerRating     string `yaml:"viewer_rating" json:"viewer_rating,omitempty"`
}

func (*Comment) Delete

func (c *Comment) Delete(writer io.Writer) error

func (*Comment) Get added in v0.9.9

func (c *Comment) Get() ([]*youtube.Comment, error)

func (*Comment) Insert

func (c *Comment) Insert(writer io.Writer) error

func (*Comment) List

func (c *Comment) List(writer io.Writer) error

func (*Comment) MarkAsSpam

func (c *Comment) MarkAsSpam(writer io.Writer) error

func (*Comment) SetModerationStatus

func (c *Comment) SetModerationStatus(writer io.Writer) error

func (*Comment) Update

func (c *Comment) Update(writer io.Writer) error

type IComment added in v0.10.5

type IComment[T any] interface {
	Get() ([]*T, error)
	List(io.Writer) error
	Insert(io.Writer) error
	Update(io.Writer) error
	Delete(io.Writer) error
	MarkAsSpam(io.Writer) error
	SetModerationStatus(io.Writer) error
}

func NewComment

func NewComment(opts ...Option) IComment[youtube.Comment]

type Option

type Option func(*Comment)

func WithAuthorChannelId

func WithAuthorChannelId(authorChannelId string) Option

func WithBanAuthor

func WithBanAuthor(banAuthor *bool) Option

func WithCanRate

func WithCanRate(canRate *bool) Option

func WithModerationStatus

func WithModerationStatus(moderationStatus string) Option

func WithParentId

func WithParentId(parentId string) Option

func WithTextFormat

func WithTextFormat(textFormat string) Option

func WithTextOriginal

func WithTextOriginal(textOriginal string) Option

func WithVideoId

func WithVideoId(videoId string) Option

func WithViewerRating

func WithViewerRating(viewerRating string) Option

Jump to

Keyboard shortcuts

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