All Projects → iamashks → OWM-JAPIs

iamashks / OWM-JAPIs

Licence: MIT license
Java APIs for OpenWeatherMap.org

Projects that are alternatives of or similar to OWM-JAPIs

TheWeatherDashboardApp
A small and stylish weather dashboard.
Stars: ✭ 29 (+107.14%)
Mutual labels:  openweathermap-api, openweathermap, weather-api, weather-forecast
angular-openweather-app
A weather forecast app written in AngularJS
Stars: ✭ 54 (+285.71%)
Mutual labels:  openweathermap-api, openweathermap, weather-data, weather-forecast
api
Community discussion and documentation for the NWS API
Stars: ✭ 168 (+1100%)
Mutual labels:  weather-information, weather-data, weather-api, weather-forecast
OpenWeatherMap-Android-Library
A wrapper for the openweathermap REST API
Stars: ✭ 100 (+614.29%)
Mutual labels:  openweathermap-api, openweathermap, openweathermap-android
weather-bar-app
Weather Bar lives in your Menu Bar giving you access to beautiful real-time weather conditions and a generous 15-day forecast.
Stars: ✭ 38 (+171.43%)
Mutual labels:  openweathermap-api, openweathermap
info-bot
🤖 A Versatile Telegram Bot
Stars: ✭ 37 (+164.29%)
Mutual labels:  weather-api, weather-forecast
wetterdienst
Open weather data for humans
Stars: ✭ 190 (+1257.14%)
Mutual labels:  weather-api, weather-forecast
Weather-Man
weather app with darksky api in flutter
Stars: ✭ 29 (+107.14%)
Mutual labels:  weather-api, weather-forecast
acuparse
Captures, stores, and displays data from an AcuRite ‎Iris/Atlas weather station and towers via an Access/smartHUB. Uploads data to Weather Underground, CWOP, Weathercloud, PWS Weather, Windy, Windguru, and OpenWeatherMap. *** MIRROR REPO | See: https://gitlab.com/acuparse/acuparse ***
Stars: ✭ 57 (+307.14%)
Mutual labels:  openweathermap, weather-data
aprs-weather-submit
Manually submit weather station information to the APRS-IS network.
Stars: ✭ 17 (+21.43%)
Mutual labels:  weather-information, weather-data
Open-Weather-API-Wrapper
An Android wrapper for the APIs of https://openweathermap.org
Stars: ✭ 23 (+64.29%)
Mutual labels:  openweathermap-api, weather-api
Wttr.in
⛅ The right way to check the weather
Stars: ✭ 16,345 (+116650%)
Mutual labels:  weather-information, weather-api
dwdweather2
Python client to access weather data from Deutscher Wetterdienst (DWD), the federal meteorological service in Germany.
Stars: ✭ 68 (+385.71%)
Mutual labels:  weather-data, weather-api
owmr
An R Interface to OpenWeatherMap
Stars: ✭ 24 (+71.43%)
Mutual labels:  openweathermap, weather-data
SciFi Conky HUD
SciFi theme for Conky
Stars: ✭ 33 (+135.71%)
Mutual labels:  openweathermap-api, openweathermap
openweather-laravel-api
Laravel OpenWeather API is a Laravel package to connect Open Weather Map API and get wether data in your own format laravel app.
Stars: ✭ 54 (+285.71%)
Mutual labels:  openweathermap-api
PyWeather
Viewing the weather in a CLI has never been this much fun. (ARCHIVED)
Stars: ✭ 28 (+100%)
Mutual labels:  weather-information
angular-weather-app
Angular 7 web app displays the weather report through openweathermap.org APIs
Stars: ✭ 13 (-7.14%)
Mutual labels:  openweathermap
android-weather
View a beautiful, material design-based 10 day weather forecast
Stars: ✭ 32 (+128.57%)
Mutual labels:  openweathermap
Weather-Downloader
Get the weather data you need right into your android app in an easy and efficient way.
Stars: ✭ 26 (+85.71%)
Mutual labels:  weather-data

#OWM JAPIs

####Java Library for OpenWeatherMap.org Weather APIs

OWM JAPIs lets you develop weather-aware applications for Android, Kotlin, and Java platforms in minimum time. It is an easy-to-use, well-documented wrapper library for OpenWeatherMap.org's Weather APIs. You can easily retrieve and use weather data in your applications using this library.

OWM JAPIs allows you to fetch weather data in only 3-5 lines of code. You can develop applications and services for multiple platforms using this library, such as Windows, Mac OS X, Linux, and Android.

Homepage: http://go.aksingh.net/owm-japis

###Why to use OWM JAPIs?

  1. Free
  2. Easy to use
  3. Supports re-use
  4. Minimizes the code
  5. Developer-friendly

With OWM JAPIs, you can focus just on your application's logic and delegate weather retrieval to this library. As a bonus, weather retrieval code becomes very short using this library - as less as 3-5 lines of code can get you weather data from OpenWeatherMap.org in your Java, Android, or Kotlin application.

Surprised? Have a look on the example(s) below.

##How to use OWM JAPIs? Do you use Maven, Gradle, or some another build tool? OWM JAPIs is available in Maven Central repository.

No? Not an issue. You can download the releases (source and binaries) from OWM JAPIs Downloads.

##Versions ###2.5 (Compatible with OpenWeatherMap.org's API v2.5)

####2.5.3.0

Major version

  1. Migrated the function calls to OWM Pro APIs from OWM -> OWMPro class
  2. Added the support for getting accumulated precipitation and temperature
  3. Improved the support for getting historical weather data from OWM APIs
  4. Requires Java 7 and supports Android, Kotlin, and Java (as of v2.5.1.0)

NOTE: Please MIGRATE the function calls to OWM Pro APIs from OWM to OWMPro.

##How to use OWM JAPIs? Anyone with little coding knowledge of Java or Kotlin will feel at home while using this library. Identifiers are written to be self-explanatory and APIs' documentation (java docs) is also provided along with OWM JAPIs.

  1. Add this JAR file in your project's libraries:
    1. owm-japis-{VERSION}.jar
  2. Write your code as such:
    1. Create and initialize object {obj1} of "OWM" class
    2. Call this object's {obj1} functions to get the desired weather data (such as current weather, daily forecast, etc.).
    3. The data is returned as a new object {obj2} of a compatible class based on the type of asked/retrieved weather data (current weather data comes in a different class's object than daily forecast data).
    4. Call this returned object's {obj2} functions to get the required information from the collective weather data (such as temperature, pressure, wind speed, etc.).

Is it hard to understand the English of programming? Well, you are not the only one. I feel the same. Kindly have a look on the example(s) below for a clear understanding.

##Example

Basic Example

####Sample Code

import net.aksingh.owmjapis.core.OWM;
import net.aksingh.owmjapis.api.APIException;
import net.aksingh.owmjapis.model.CurrentWeather;

public class OwmJapisExample1 {

    public static void main(String[] args)
            throws APIException {
            
        // declaring object of "OWM" class
        OWM owm = new OWM("YOUR-API-KEY-HERE");

        // getting current weather data for the "London" city
        CurrentWeather cwd = owm.currentWeatherByCityName("London");

        //printing city name from the retrieved data
        System.out.println("City: " + cwd.getCityName());
        
        // printing the max./min. temperature
        System.out.println("Temperature: " + cwd.getMainData().getTempMax()
                            + "/" + cwd.getMainData().getTempMin() + "\'K");
    }
}

####Output

City: London
Temperature: 73.4/68.72 'K

###Advance Example You can simply use the APIs (as given in the basic example) for learning, testing or experimenting with the functions provided in this library. But it may not be good enough for production or deployment environment. Don't you agree?

Professionally, you should always write code which can handle errors as best as possible. OWM JAPIs helps here too by providing checker functions which allows you to check if a data is available or not, i.e., that particular data is retrieved and parsed properly or not. Of course, exception handling can still be used, but these functions are really useful and make the retrieved-data-error-handling task very simple.

Using OWM JAPIs, you can always check if a particular data is available or not. This is done by using the has{DATA-NAME}() functions. For example, hasRespCode() function checks if the retrieved data has a response code or not. And if available, response code can be used to check if the whole data was downloaded and parsed correctly or not, as you can see in the example below.

####Sample Code

import net.aksingh.owmjapis.core.OWM;
import net.aksingh.owmjapis.api.APIException;
import net.aksingh.owmjapis.model.CurrentWeather;

public class OwmJapisExample2 {

    public static void main(String[] args)
            throws APIException {
        
        // declaring object of "OWM" class
        OWM owm = new OWM("YOUR-API-KEY-HERE");

        // getting current weather data for the "London" city
        CurrentWeather cwd = owm.currentWeatherByCityName("London");
        
        // checking data retrieval was successful or not
        if (cwd.hasRespCode() && cwd.getRespCode() == 200) {
        
            // checking if city name is available
            if (cwd.hasCityName()) {
                //printing city name from the retrieved data
                System.out.println("City: " + cwd.getCityName());
            }
            
            // checking if max. temp. and min. temp. is available
            if (cwd.hasMainData() && cwd.getMainData().hasTempMax() && cwd.getMainData().hasTempMin()) {
                // printing the max./min. temperature
                System.out.println("Temperature: " + cwd.getMainData().getTempMax()
                            + "/" + cwd.getMainData().getTempMin() + "\'K");
            }
        }
    }
}

####Output

City: London
Temperature: 73.4/68.72 'K

##Source code Download the library's source code from OWM JAPIs Source.

##Bugs / Requests Got a problem, error or bug in the library? Or want a new feature that's not already available in OWM JAPIs?

Kindly post bugs or feature requests at OWM JAPIs Issues and I will try to solve/add it in the next release.

##Developer Ashutosh Kumar Singh | www.aksingh.net | [email protected]

and contributors. Do you wish to contribute? Just fork this repo on BitBucket or GitHub and send a pull request.

##Credits

  1. OpenWeatherMap.org for providing free weather data and creating easy-to-use APIs.

  2. ForecastIO-Lib-Java for providing ideas like support for third-party Http libraries.

  3. You - for supporting OWM JAPIs and reporting bugs, and finding and sharing solutions for them too.

##License Copyright (c) 2013-2017 Ashutosh Kumar Singh <[email protected]>

Released under the terms of the MIT license. It's open source and developer-friendly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].