NewMonitorItemsListCmd returns a list or monitor_items according to a filter.
()
| 41 | |
| 42 | // NewMonitorItemsListCmd returns a list or monitor_items according to a filter. |
| 43 | func NewMonitorItemsListCmd() *cobra.Command { |
| 44 | cmd := &cobra.Command{ |
| 45 | Use: "list", |
| 46 | Short: "List monitor in your account", |
| 47 | Example: monitorItemsCmdExample, |
| 48 | RunE: func(cmd *cobra.Command, args []string) error { |
| 49 | p, err := NewPrinter(cmd) |
| 50 | if err != nil { |
| 51 | return err |
| 52 | } |
| 53 | return p.PrintCollection(vt.URL("monitor/items")) |
| 54 | }, |
| 55 | } |
| 56 | |
| 57 | addIncludeExcludeFlags(cmd.Flags()) |
| 58 | addFilterFlag(cmd.Flags()) |
| 59 | addLimitFlag(cmd.Flags()) |
| 60 | addCursorFlag(cmd.Flags()) |
| 61 | |
| 62 | return cmd |
| 63 | } |
| 64 | |
| 65 | // Monitor downloader, it implements the Doer interface. Retrieves the item |
| 66 | // path to know the destination filename and downloads and save each individual |
no test coverage detected