Esempio n. 1
0
func visualisationURL(c *cli.Context) error {
	client := doaramacli.NewDoaramaClient(c)
	vuo := doaramacli.NewVisualisationURLOptions(c)
	for _, arg := range c.Args() {
		v := client.Visualisation(arg)
		fmt.Printf("VisualisationURL: %s\n", v.URL(vuo))
	}
	return nil
}
Esempio n. 2
0
func queryActivityTypes(c *cli.Context) error {
	ctx := context.Background()
	client := doaramacli.NewDoaramaClient(c)
	defer client.Close()
	ats, err := client.ActivityTypes(ctx)
	if err != nil {
		return err
	}
	sort.Sort(byName(ats))
	for _, at := range ats {
		fmt.Printf("%s: %d\n", at.Name, at.ID)
	}
	return nil
}