PHPackages                             thomasboom89/openweathermap-one-call-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. thomasboom89/openweathermap-one-call-api

ActiveLibrary[API Development](/categories/api)

thomasboom89/openweathermap-one-call-api
========================================

A wrapper for Openweathermap One Call Api v1

v2.0.0(2y ago)284[5 PRs](https://github.com/ThomasBoom89/openweathermap-one-call-api/pulls)MITPHPPHP &gt;=8.2CI passing

Since May 29Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/ThomasBoom89/openweathermap-one-call-api)[ Packagist](https://packagist.org/packages/thomasboom89/openweathermap-one-call-api)[ RSS](/packages/thomasboom89-openweathermap-one-call-api/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (5)Dependencies (11)Versions (11)Used By (0)

Openweathermap One Call API
===========================

[](#openweathermap-one-call-api)

[![PHP](https://camo.githubusercontent.com/c462bad5c280eed5afa38ded37edf37c0f890eaab1a89a2de9b031b713dbc745/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e322d2532333838393242463f7374796c653d706c6173746963266c6f676f3d706870)](https://camo.githubusercontent.com/c462bad5c280eed5afa38ded37edf37c0f890eaab1a89a2de9b031b713dbc745/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e322d2532333838393242463f7374796c653d706c6173746963266c6f676f3d706870)[![License](https://camo.githubusercontent.com/c7a3c3b989abcdad937469d06ac53c605ce1b08afbf7e74a7f0636cbc50dc0dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f7374796c653d706c6173746963)](https://camo.githubusercontent.com/c7a3c3b989abcdad937469d06ac53c605ce1b08afbf7e74a7f0636cbc50dc0dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f7374796c653d706c6173746963)

A wrapper for Openweathermap One Call Api v1 -&gt; [Link](https://openweathermap.org/api/one-call-api).

⚡ Currently not working due to changes from openweathermap!Read here -&gt; I will upgrade to version 3 as soon as possible### Attention!

[](#attention)

I am not owner or maintainer of the API (). This is only a wrapper for it. You need to get an api-key from their site to use the api.

Requirement
-----------

[](#requirement)

You need a working environment with php &gt;= 8.2 and composer.

Installation
------------

[](#installation)

```
composer require thomasboom89/openweathermap-one-call-api
```

Usage
-----

[](#usage)

Create an instance of the OneCallApi

```
$httpClient  = new Client();
$httpFactory = new HttpFactory();
$owmoca      = new OneCallApi("YOUR-API-KEY", $httpClient, $httpFactory);

// Optional use caching interface
$pool        = new ArrayAdapter();
$cache       = new Psr16Cache($pool);
$owmoca      = new OneCallApi("YOUR-API-KEY", $httpClient, $httpFactory, $cache, 240);
```

Now you can use it to make a request

```
// lat , lon , language , unitsystem
try {
    $forecast = $owmoca->getForecast(-78.944450, 19.458971, OneCallApi\Language::German, OneCallApi\Unit::Metric);
 } catch (Exception $exception){
    // handle exception
 }
```

You will receive a forecast object

```
var_dump($forecast);
```

FAQ
---

[](#faq)

Q: Which language is currently supported?
A: You have to use Enum Thomasboom89\\OpenWeatherMap\\OneCallApi\\Language
(If a language is missing, please open an issue)

Q: Which unitsystem is currently supported?
A: You have to use Enum Thomasboom89\\OpenWeatherMap\\OneCallApi\\Unit \\

License
-------

[](#license)

Openweathermap One Call API Copyright (C) 2023 ThomasBoom89. MIT license.

Openweathermap One Call API includes several third-party Open-Source libraries, which are licensed under their own respective Open-Source licenses.

See `composer license` for complete list of depending libraries.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance57

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 54% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~149 days

Total

5

Last Release

844d ago

Major Versions

v0.0.3 → v1.0.02024-01-09

v1.0.0 → v2.0.02024-01-16

PHP version history (3 changes)v0.0.1PHP &gt;=8.0

v1.0.0PHP &gt;=8.1

v2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/78e8a2f79df27eee6c1df506c3d564c14415190e651a0df3dd0b3dd1dd75b203?d=identicon)[thomasboom89](/maintainers/thomasboom89)

---

Top Contributors

[![ThomasBoom89](https://avatars.githubusercontent.com/u/51998416?v=4)](https://github.com/ThomasBoom89 "ThomasBoom89 (230 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (196 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thomasboom89-openweathermap-one-call-api/health.svg)

```
[![Health](https://phpackages.com/badges/thomasboom89-openweathermap-one-call-api/health.svg)](https://phpackages.com/packages/thomasboom89-openweathermap-one-call-api)
```

###  Alternatives

[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[kbsali/redmine-api

Redmine API client

4221.1M24](/packages/kbsali-redmine-api)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[prokerala/astrology-sdk

Prokerala.com Astrology API Client Library for PHP.

2610.0k](/packages/prokerala-astrology-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
