private void fetchHoroscopeNameAndImage() { string dateOfBirth = FBAgent.LoggedInUser.Birthday; DateTime userDOB = DateTime.ParseExact(dateOfBirth, "MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture); m_ZodiacName = HoroscopeAgent.GetZodiacName(userDOB); pictureBoxHoroscope.Image = HoroscopeAgent.GetZodiacImage(m_ZodiacName); labelHoroscopeTitle.Text = string.Format("You Are {0}!", m_ZodiacName.ToString()); }
internal static string GetHoroscope(eZodiacs i_Zodiac) { string horoscope = null; string horoscopeURL = "http://horoscope-api.herokuapp.com/horoscope/today/" + i_Zodiac.ToString(); string response = HttpGetRequest(horoscopeURL); horoscope = getHoroscopeText(response); return(horoscope); }