32 lines
672 B
Go
32 lines
672 B
Go
package playlist
|
|
|
|
import (
|
|
"github.com/eat-pray-ai/yutu/pkg/yutuber/playlist"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var deleteCmd = &cobra.Command{
|
|
Use: "delete",
|
|
Short: "delete a playlist",
|
|
Long: "delete a playlist",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
p := playlist.NewPlaylist(
|
|
playlist.WithId(id),
|
|
playlist.WithOnBehalfOfContentOwner(onBehalfOfContentOwner),
|
|
playlist.WithService(),
|
|
)
|
|
p.Delete()
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
playlistCmd.AddCommand(deleteCmd)
|
|
|
|
deleteCmd.Flags().StringVarP(
|
|
&id, "id", "i", "", "ID of playlist to be deleted",
|
|
)
|
|
deleteCmd.Flags().StringVarP(
|
|
&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "",
|
|
)
|
|
}
|