This project is read-only.

Animaonline Weather API - Tutorials - CSharp

Tutorial
  • Start Visual Studio
  • Go to "File" --> "New" --> "Project" --> "Console Application"
  • Click OK
Now you will have to add the Animaonline Weather API Library to your project's reference list
  • Go to "Project" --> "Add Reference..." --> Open the "Browse" tab, and browse for the compiled Animaonline Weather API Library --> "OK"
Now you are set to start writing some code.

Add the following code to the application's static void Main
            Animaonline.WeatherAPI.WeatherData wD = new WeatherData(LanguageCode.en_US, "Phoenix , AZ");
            Console.WriteLine("Condition:{0} Temperature:{1}°F {2}°C", wD.condition, wD.temp_f, wD.temp_c);

The application will look like this when you're done
using System;

namespace Animaonline.WeatherAPI.Tests
{
    class ConsoleTest
    {
        [STAThread]
        static void Main()
        {
            Animaonline.WeatherAPI.WeatherData wD = new WeatherData(LanguageCode.en_US, "Phoenix , AZ");
            Console.WriteLine("Condition:{0} Temperature:{1}°F {2}°C", wD.condition, wD.temp_f, wD.temp_c);
        }
    }
}
  • Now start your application by pressing Ctrl + F5

If you encounter any errors , feel free to ask in the forums.

P.S. For a full list of properties refer to API Overview page.

Programmed by Roman Alifanov, uses Google's Weather Feed, licensed under GNU General Public License version 2
© 2007-2009 Roman Alifanov

Last edited Jul 31, 2009 at 2:27 PM by animaonline, version 5

Comments

No comments yet.