The Sandbox Thread

1 post

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Animaonline Weather API

Back to Forum: The Sandbox
  • User profile image
    Animaonline

    Animaonline Weather API


    Project Description
    Gets data from Google's weather feed, and lets the user easily view such properties as forecast conditions, humidity, current temperature and so on.

    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.WeatherAPI awAPI = new Animaonline.WeatherAPI.WeatherAPI();
    awAPI.FillWeatherData("Tokyo", true);
    Console.WriteLine("Current temperature in {0}, {1}°F/{2}°C", awAPI.postal_code, awAPI.temp_f,awAPI.temp_c);

    The application will look like this when you're done
    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace Animaonline_Weather_API_Test
    {
    class Program
    {
    static void Main(string[] args)
    {
    Animaonline.WeatherAPI.WeatherAPI awAPI = new Animaonline.WeatherAPI.WeatherAPI();
    awAPI.FillWeatherData("Tokyo", true);
    Console.WriteLine("Current temperature in {0}, {1}°F/{2}°C", awAPI.postal_code, awAPI.temp_f,awAPI.temp_c);
    }
    }
    }

    • Now start your application by pressing Ctrl + F5

    Check out the project at CodePlex

    And don't forget to check out my blog Smiley

    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.

    - Roman Alifanov

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.