func (c *client) ListRoutes(parentRef string) ([]*router.Route, error) { path := "/routes" if parentRef != "" { q := make(url.Values) q.Set("parent_ref", parentRef) path += "?" + q.Encode() } var res []*router.Route err := c.get(path, &res) return res, err }
func (c *client) GetRoute(id string) (*router.Route, error) { res := &router.Route{} err := c.get("/routes/"+id, res) return res, err }