{"id":17132859,"url":"https://github.com/lazee/meteo","last_synced_at":"2025-04-13T07:56:02.563Z","repository":{"id":57738105,"uuid":"1525711","full_name":"lazee/meteo","owner":"lazee","description":"Java library/client for https://api.met.no","archived":false,"fork":false,"pushed_at":"2022-10-23T18:40:14.000Z","size":1541,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":76,"default_branch":"master","last_synced_at":"2025-04-13T07:55:57.606Z","etag":null,"topics":["api","java","library","met-api","meteo","team-happydesk","weather","weather-data"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lazee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-03-25T14:23:41.000Z","updated_at":"2023-02-01T08:06:13.000Z","dependencies_parsed_at":"2022-08-30T12:11:11.848Z","dependency_job_id":null,"html_url":"https://github.com/lazee/meteo","commit_stats":null,"previous_names":["amedia/meteo"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazee%2Fmeteo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazee%2Fmeteo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazee%2Fmeteo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazee%2Fmeteo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lazee","download_url":"https://codeload.github.com/lazee/meteo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681490,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","java","library","met-api","meteo","team-happydesk","weather","weather-data"],"created_at":"2024-10-14T19:28:36.549Z","updated_at":"2025-04-13T07:56:02.540Z","avatar_url":"https://github.com/lazee.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# METEO\n\nDEPRECATED: This client is not maintained anymore.\n\nMeteo is an Open-Source Java based library/client for handling weather data from http://api.met.no.\n\nIt mainly consists of two parts: A Java client that parses data from the MET api into java objects and helper tools to help you\npick the right kind of data for different scenarios.\n\nPlease note that Meteo is in no way affiliated with the Norwegian Meteorological Institute\nexcept for the fact that it use their API to provide you with weather data.\n\nMeteo is developed and maintained by Amedia Utvikling AS. It is in use within all the Amedia sites (more than 70).\nIt mainly supports the services that Amedia needs at any given time. But we will consider adding other services as\nwell upon request (or send a pull request).\n\n## The MET terms of use\n\nMake sure to read the [Conditions for use of the service](http://api.met.no/conditions_service.html) from\nthe Norwegian Meteorological Institute.\n\nAlso make sure to read this http://api.met.no/license_data.html.\n\n## Reverse proxying\n\nAs MET states in their terms of use, you must respect their cache headers. Meaning that you should only fetch one\nresource one time within the TTL set by MET in each response.\n\nThe easiest way to achieve this is by installing a [Reverse Proxy](https://en.wikipedia.org/wiki/Reverse_proxy)\nlike [Squid](http://wiki.squid-cache.org/SquidFaq/ReverseProxy). An alternative solution is to implement your own\n[MeteoClient](https://github.com/amedia/meteo/blob/master/meteo-core/src/main/java/no/api/meteo/client/MeteoClient.java)\nthat respects these requirements.\n\nThe [default implementation](https://github.com/amedia/meteo/blob/master/meteo-client/src/main/java/no/api/meteo/client/DefaultMeteoClient.java)\nof MeteoClient does not have any caching what so ever, but it does support configuring a proxy.\n\n## The core library and client\n\nThe core library in Meteo is all about offering access to the raw MET data through a Java API.\nAs stated earlier we have only implemented support for the services that Amedia needs or that is requested/implemented\nby other users (Please send pull requests).\n\n### Requirements\n\nMeteo requires Java 8.x or later.\n\n### Installation\n\nYou will find Meteo in the central maven repository: http://search.maven.org/#search|ga|1|a%3A%22meteo%22\n\nFor Maven you would add this to your pom:\n\n~~~ java\n\u003cdependency\u003e\n    \u003cgroupId\u003eno.api.meteo\u003c/groupId\u003e\n    \u003cartifactId\u003emeteo-core\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n~~~\n\nIf you want to use the default implementation of a MeteoClient, then you would also have to add this:\n\n~~~ xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eno.api.meteo\u003c/groupId\u003e\n    \u003cartifactId\u003emeteo-client\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n~~~\n\n### Usage\n\nIn the [meteo-examples](https://github.com/amedia/meteo/tree/master/meteo-examples/src/main/java/no/api/meteo/examples)\n module you will find several useful examples that should get you up and running\n\n#### Creating a default client\n\nIf you feel fine with the default MeteoClient shipped with Meteo, then create a client like this:\n\n~~~ java\nMeteoClient meteoClient = new DefaultMeteoClient();\n~~~\n\nThis client allows you to configure a proxy and connection timeout if needed:\n\n~~~ java\nmeteoClient.setProxy(\"myproxy.host\", 9000);\nmeteoClient.setTimeout(1000);\n~~~\n\nYou can also create you own client easily by implementing the MeteoClient interface in your own class.\n\n### Services\n\nThe Meteo core library is organized in a set of services where each service represents on of the services in the MET API.\nEach service will need an Meteo client to be able to fetch data.\n\nCurrent services:\n\n* Location forecast\n* Sunrise\n* Text forecast (Experimental)\n* Text locations (Experimental)\n\n#### Location forecast service\n\nThis is the service for fetching raw data from http://api.met.no/weatherapi/locationforecastlts/1.2/documentation.\n\n~~~ java\nLocationforecastLTSService service = new LocationforecastLTSService(meteoClient);\ntry {\n    MeteoData\u003cLocationForecast\u003e data = service.fetchContent(longitude, latitude, altitude);\n} catch (MeteoException e) {\n    // Handle exception.\n}\n~~~\n\n#### Sunrise service\n\nThis is the service for fetching raw data from http://api.met.no/weatherapi/sunrise/1.0/documentation.\n\n~~~ java\nSunriseService service = new SunriseService(meteoClient);\ntry {\n    MeteoData\u003cSunrise\u003e data = service.fetchContent(longitude, latitude, date);\n} catch (MeteoException e) {\n    // Handle exception.\n}\n~~~\n\n## General developer notes\n\nMeteo uses checked exceptions at the moment. This will change in the 3.1.x versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazee%2Fmeteo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazee%2Fmeteo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazee%2Fmeteo/lists"}