✨ Support delete a video
This commit is contained in:
1 parent
b8fdd8e0d6
commit
f413f632a1
2 files changed
+38
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package video
|
||||
|
||||
import (
|
||||
"github.com/eat-pray-ai/yutu/pkg/yutuber/video"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var deleteCmd = &cobra.Command{
|
||||
Use: "delete",
|
||||
Short: "delete a video on Youtube",
|
||||
Long: "delete a video on Youtube",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
v := video.NewVideo(video.WithId(id))
|
||||
v.Delete()
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
videoCmd.AddCommand(deleteCmd)
|
||||
|
||||
deleteCmd.Flags().StringVarP(&id, "id", "i", "", "ID of the video to delete")
|
||||
deleteCmd.MarkFlagRequired("id")
|
||||
}
|
||||
Reference in new issue
Block a user