30 lines
754 B
Go
30 lines
754 B
Go
package caption
|
|
|
|
import (
|
|
"github.com/eat-pray-ai/yutu/pkg/yutuber/caption"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var deleteCmd = &cobra.Command{
|
|
Use: "delete",
|
|
Short: "delete caption",
|
|
Long: "delete caption of a video",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
c := caption.NewCation(
|
|
caption.WithId(id),
|
|
caption.WithOnBehalfOf(onBehalfOf),
|
|
caption.WithOnBehalfOfContentOwner(onBehalfOfContentOwner),
|
|
caption.WithService(),
|
|
)
|
|
c.Delete()
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
captionCmd.AddCommand(deleteCmd)
|
|
|
|
deleteCmd.Flags().StringVarP(&id, "id", "i", "", "ID of the caption")
|
|
deleteCmd.Flags().StringVarP(&onBehalfOf, "onBehalfOf", "b", "", "")
|
|
deleteCmd.Flags().StringVarP(&onBehalfOfContentOwner, "onBehalfOfContentOwner", "B", "", "")
|
|
}
|