code: func (s *TasksListService) buildURL() (string, url.Values, error) {
  	// Build URL
  	var err error
  	var path string
  	if len(s.taskId) > 0 {
  		path, err = uritemplates.Expand("/_tasks/{task_id}", map[string]string{
  			"task_id": strings.Join(s.taskId, ","),
  		})
  	} else {
  		path = "/_tasks"
  	}
  	if err != nil {
  		return "", url.Values{}, err
  	}
  
  	// Add query string parameters
  	params := url.Values{}
  	if s.pretty {
  		params.Set("pretty", "true")
  	}
  	if len(s.actions) > 0 {
  		params.Set("actions", strings.Join(s.actions, ","))
  	}
  	if s.detailed != nil {
  		params.Set("detailed", fmt.Sprintf("%v", *s.detailed))
  	}
  	if s.human != nil {
  		params.Set("human", fmt.Sprintf("%v", *s.human))
  	}
  	if len(s.nodeId) > 0 {
  		params.Set("nodes", strings.Join(s.nodeId, ","))
  	}
  	if s.parentTaskId != "" {
  		params.Set("parent_task_id", s.parentTaskId)
  	}
  	if s.waitForCompletion != nil {
  		params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
  	}
  	if s.groupBy != "" {
  		params.Set("group_by", s.groupBy)
  	}
  	return path, params, nil
  }
docs: // buildURL builds the URL for the operation.