8000 GitHub - Akayxn/weather-app: Built a weather app using the api where you can get the temperature depending on the location
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Built a weather app using the api where you can get the temperature depending on the location

Notifications You must be signed in to change notification settings

Akayxn/weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌤️ Weather App

A simple Java console app that fetches and displays the current weather of a given city using the WeatherAPI.


🚀 Features

  • Takes city name as input
  • Fetches real-time weather data using HTTP requests
  • Parses and displays:
    • City and country
    • Local date
    • Temperature (°C / °F)
    • Weather condition
  • Loops until you type exit

🛠️ Built With


📦 Getting Started

Prerequisites

  • Java installed
  • Maven installed
  • WeatherAPI key (free to get from weatherapi.com)

Setup

  1. Clone the repo:
    git clone https://github.com/your-username/weather-app.git
    cd weather-app
  2. Add your API Key to the API_Key variable in the code.
  3. Run the app:
    mvn compile
    mvn exec:java
    

❗ Handling Errors

If the user types an invalid city, the app currently may crash.
To fix this, you can check the status code or catch the JSON exception and show a friendly message.


📄 License

This project is open source and free to use.

About

Built a weather app using the api where you can get the temperature depending on the location

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0