// HistoryByName will return the history for the provided location
544853
func (h *HistoricalWeatherData) HistoryByName(location string) error {
	response, err := h.client.Get(fmt.Sprintf(fmt.Sprintf(historyURL, "city?appid=%s&q=%s"), h.Key, url.QueryEscape(location)))
	if err != nil {
		return err
	}
	defer response.Body.Close()

	if err = json.NewDecoder(response.Body).Decode(&h); err != nil {
		return err
	}

	return nil
}
358311
func (api *AutoBackupAPI) SortByName(reverse bool) *AutoBackupAPI {
	api.sortByName(reverse)
	return api
}
90448
func (r *ClientService) History(clientId string) *ClientHistoryCall {
	c := &ClientHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.urlParams_.Set("clientId", clientId)
	return c
}
368806
func (net *Network) GetNodeByName(name string) *Node {
	net.lock.RLock()
	defer net.lock.RUnlock()
	return net.getNodeByName(name)
}
205308
func (s *grpcAPIService) History(ctx context.Context, req *HistoryRequest) (*HistoryResponse, error) {
	return s.api.History(ctx, req), nil
}
1017745
func (s *Storage) History(name string) ([]*rspb.Release, error) {
	s.Log("getting release history for %q", name)

	return s.Driver.Query(map[string]string{"NAME": name, "OWNER": "TILLER"})
}
1225948
func (api *ServerAPI) SortByName(reverse bool) *ServerAPI {
	api.sortByName(reverse)
	return api
}
156432
func BGPStateByName(name string) BGPState {
	name = strings.ToLower(name)
	for s := range stateNames {
		if strings.ToLower(stateNames[s]) == name {
			return s
		}
	}
	return BGPStateUnknown
}
607683
func CloudByName(cloudName string) (*jujucloud.Cloud, error) {
	cloud, err := jujucloud.CloudByName(cloudName)
	if err != nil {
		if errors.IsNotFound(err) {
			// Check built in clouds like localhost (lxd).
			builtinClouds, err := BuiltInClouds()
			if err != nil {
				return nil, errors.Trace(err)
			}
			aCloud, found := builtinClouds[cloudName]
			if !found {
				return nil, errors.NotFoundf("cloud %s", cloudName)
			}
			return &aCloud, nil
		}
		return nil, errors.Trace(err)
	}
	return cloud, nil
}
602425
func (p *Parameter) ByName(name string) (string, error) {
	if i, has := p.names[name]; has {
		return p.findParam(i)
	}
	return "", fmt.Errorf("Parameter not found")
}
237737
func (a *Application) StatusHistory(filter status.StatusHistoryFilter) ([]status.StatusInfo, error) {
	args := &statusHistoryArgs{
		db:        a.st.db(),
		globalKey: a.globalKey(),
		filter:    filter,
	}
	return statusHistory(args)
}
804795
func (prof *Profiles) ByName(name string) (*User, error) {
	body, err := prof.inst.sendSimpleRequest(urlUserByName, name)
	if err == nil {
		resp := userResp{}
		err = json.Unmarshal(body, &resp)
		if err == nil {
			user := &resp.User
			user.inst = prof.inst
			return user, err
		}
	}
	return nil, err
}
562567
func (api *PrivateHostAPI) SortByName(reverse bool) *PrivateHostAPI {
	api.sortByName(reverse)
	return api
}
882580
func (c *Client) RegistrationByName(name string) (r contract.Registration, err error) {
	conn := c.Pool.Get()
	defer conn.Close()

	err = getObjectByHash(conn, db.ExportCollection+":name", name, unmarshalObject, &r)
	return r, err
}
1200134
func (c *Client) ImageHistory(name string) ([]ImageHistory, error) {
	resp, err := c.do("GET", "/images/"+name+"/history", doOptions{})
	if err != nil {
		if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
			return nil, ErrNoSuchImage
		}
		return nil, err
	}
	defer resp.Body.Close()
	var history []ImageHistory
	if err := json.NewDecoder(resp.Body).Decode(&history); err != nil {
		return nil, err
	}
	return history, nil
}
731312
func (api *SimpleMonitorAPI) SortByName(reverse bool) *SimpleMonitorAPI {
	api.sortByName(reverse)
	return api
}
208129
func (m *Monitor) NodeByName(name string) (index int, node *Node) {
	m.mtx.Lock()
	defer m.mtx.Unlock()

	for i, n := range m.Nodes {
		if name == n.Name {
			return i, n
		}
	}
	return -1, nil
}