func fetchPeopleProfileInfo()

in resources/tables.go [103:124]


func fetchPeopleProfileInfo(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
	c := meta.(*client.Client)
	store := c.Store

	data, err := store.Get("peopleProfileInfo.json")
	if err != nil {
		return err
	}

	var records map[string]PersonProfileInfo
	err = json.Unmarshal(data, &records)
	if err != nil {
		return err
	}

	for ID, record := range records {
		record.ID = ID // Galaxies profile info uses email ID as the map keys, so pull this out.
		res <- record
	}

	return nil
}