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)184[5 PRs](https://github.com/ThomasBoom89/openweathermap-one-call-api/pulls)MITPHPPHP &gt;=8.2CI passing

Since May 29Pushed 5mo 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 3w 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

37

—

LowBetter than 81% of packages

Maintenance50

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

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

898d 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

[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k14](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60216.0M82](/packages/mollie-mollie-api-php)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

185702.8k42](/packages/laudis-neo4j-php-client)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)

PHPackages © 2026

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