func (t Team) Apps() <-chan set.Set {
	channel := make(chan set.Set)
	go func() {
		registrychannel := make(chan set.Set)
		extraschannel := berthateam.Team{t.Name(), "1JcsgN_YLG67KXqRQi-vRloUgvywj7BWdg4rt4OoGsDw"}.Apps()
		go func() {
			rawservices := make([]struct {
				Nodes []struct {
					Url string
				}
			}, 0)
			if err := fetch.Fetch("GET", "https://next-registry.ft.com/v2/", &rawservices, nil, nil); err != nil {
				// TODO: Something better than this
				panic(err)
			}

			apps := set.New()
			re := regexp.MustCompile(`^https?:\/\/([^.]+)\.herokuapp\.com`)
			for _, rawservice := range rawservices {
				for _, node := range rawservice.Nodes {
					if rawapp := re.FindStringSubmatch(node.Url); rawapp != nil {
						apps.Add(rawapp[1])
					}
				}
			}
			registrychannel <- apps
		}()
		registryset, extrasset := <-registrychannel, <-extraschannel
		channel <- set.Union(registryset, extrasset)
	}()
	return channel
}
func fetchHeroku(method string, url string, responseObject interface{}, requestObject interface{}) error {
	headers := map[string]string{
		"Accept":        "application/vnd.heroku+json; version=3.federated-identity",
		"Authorization": "Bearer " + os.Getenv("HEROKU_AUTH_TOKEN"),
	}
	if requestObject != nil {
		headers["Content-Type"] = "application/json"
	}
	return fetch.Fetch(method, url, responseObject, requestObject, headers)
}
func (t Team) Devs() <-chan set.Set {
	channel := make(chan set.Set)
	go func() {
		rawdevs := make([]struct {
			Email string
		}, 0)
		if err := fetch.Fetch("GET", "https://bertha.ig.ft.com/view/publish/gss/"+t.Sheet+"/devs", &rawdevs, nil, nil); err != nil {
			panic(err)
		}

		devs := set.New()
		for _, rawdev := range rawdevs {
			devs.Add(rawdev.Email)
		}
		channel <- devs
	}()
	return channel
}
func (t Team) Apps() <-chan set.Set {
	channel := make(chan set.Set)
	go func() {
		rawapps := make([]struct {
			App string
		}, 0)
		if err := fetch.Fetch("GET", "https://bertha.ig.ft.com/view/publish/gss/"+t.Sheet+"/apps", &rawapps, nil, nil); err != nil {
			panic(err)
		}

		apps := set.New()
		for _, rawapp := range rawapps {
			apps.Add(rawapp.App)
		}
		channel <- apps
	}()
	return channel

}