func (o *OrgsClient) GetByName(ctx context.Context, name string) (*OrgResult, error) {
	v := &url.Values{}
	if name == "" {
		return nil, errors.New("invalid org name")
	}
	v.Set("name", name)

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

	orgs := []OrgResult{}
	_, err = o.client.Do(ctx, req, &orgs, nil, nil)
	if err != nil {
		return nil, err
	}
	if len(orgs) < 1 {
		return nil, nil
	}

	return &orgs[0], nil
}
// GetByName retrieves an org by its named
GetByName retrieves an org by its named
// GetByName retrieves an org by its named
func (o *OrgsClient) GetByName(ctx context.Context, name string) (*OrgResult, error) {
	v := &url.Values{}
	if name == "" {
		return nil, errors.New("invalid org name")
	}
	v.Set("name", name)
	req, _, err := o.client.NewRequest("GET", "/orgs", v, nil, true)
	if err != nil {
		return nil, err
	}
	orgs := []OrgResult{}
	_, err = o.client.Do(ctx, req, &orgs, nil, nil)
	if err != nil {
		return nil, err
	}
	if len(orgs) < 1 {
		return nil, nil
	}
	return &orgs[0], nil
}
func ( o * OrgsClient ) GetByName ( ctx context . Context , name string ) ( * OrgResult , error ) { v := & url . Values { } if name == " " { return nil , errors . New ( " " ) } v . Set ( " " , name ) req , _ , err := o . client . NewRequest ( " " , " " , v , nil , true ) if err != nil { return nil , err } orgs := [ ] OrgResult { } _ , err = o . client . Do ( ctx , req , & orgs , nil , nil ) if err != nil { return nil , err } if len ( orgs ) < 1 { return nil , nil } return & orgs [ 0 ] , nil }
GetByName retrieves an org by its named
GetByName retrieves an org by its named