func (e *EnvironmentsClient) List(ctx context.Context, orgIDs, projectIDs *[]*identity.ID, names *[]string) ([]EnvironmentResult, error) {
	v := &url.Values{}
	if orgIDs != nil {
		for _, id := range *orgIDs {
			v.Add("org_id", id.String())
		}
	}
	if projectIDs != nil {
		for _, id := range *projectIDs {
			v.Add("project_id", id.String())
		}
	}
	if names != nil {
		for _, n := range *names {
			v.Add("name", n)
		}
	}

	req, _, err := e.client.NewRequest("GET", "/envs", v, nil, true)
	if err != nil {
		return nil, err
	}

	envs := []EnvironmentResult{}
	_, err = e.client.Do(ctx, req, &envs, nil, nil)
	return envs, err
}
// List retrieves relevant envs by name and/or orgID and/or projectID
List retrieves relevant envs by name and/or orgID and/or projectID
// List retrieves relevant envs by name and / or orgID and / or projectID
func (e *EnvironmentsClient) List(ctx context.Context, orgIDs, projectIDs *[]*identity.ID, names *[]string) ([]EnvironmentResult, error) {
	v := &url.Values{}
	if orgIDs != nil {
		for _, id := range *orgIDs {
			v.Add("org_id", id.String())
		}
	}
	if projectIDs != nil {
		for _, id := range *projectIDs {
			v.Add("project_id", id.String())
		}
	}
	if names != nil {
		for _, n := range *names {
			v.Add("name", n)
		}
	}
	req, _, err := e.client.NewRequest("GET", "/envs", v, nil, true)
	if err != nil {
		return nil, err
	}
	envs := []EnvironmentResult{}
	_, err = e.client.Do(ctx, req, &envs, nil, nil)
	return envs, err
}
func ( e * EnvironmentsClient ) List ( ctx context . Context , orgIDs , projectIDs * [ ] * identity . ID , names * [ ] string ) ( [ ] EnvironmentResult , error ) { v := & url . Values { } if orgIDs != nil { for _ , id := range * orgIDs { v . Add ( " " , id . String ( ) ) } } if projectIDs != nil { for _ , id := range * projectIDs { v . Add ( " " , id . String ( ) ) } } if names != nil { for _ , n := range * names { v . Add ( " " , n ) } } req , _ , err := e . client . NewRequest ( " " , " " , v , nil , true ) if err != nil { return nil , err } envs := [ ] EnvironmentResult { } _ , err = e . client . Do ( ctx , req , & envs , nil , nil ) return envs , err }
List retrieves relevant envs by name and/or orgID and/or projectID
List retrieves relevant envs by name and / or orgID and / or projectID