code: func (c *CacheLazyFill) fetchEntityListFromAPI(entityType string) (map[string]*entity, error) {
  	url := fmt.Sprintf("/v2/%s?results-per-page=100", entityType)
  	rv := make(map[string]*entity)
  	for {
  		var md struct {
  			NextURL   string `json:"next_url"`
  			Resources []*struct {
  				Metadata struct {
  					GUID string `json:"guid"`
  				} `json:"metadata"`
  				Entity *entity `json:"entity"`
  			} `json:"resources"`
  		}
  		err := c.makeRequestAndDecodeJSON(url, &md)
  		if err != nil {
  			return nil, err
  		}
  
  		for _, r := range md.Resources {
  			rv[r.Metadata.GUID] = r.Entity
  		}
  
  		if md.NextURL == "" {
  			// we're done!
  			return rv, nil
  		}
  
  		url = md.NextURL
  	}
  }
docs: // fetchEntityListFromAPI fetches a full list of all such entities from the server
  // entityType must have been validated by the caller