PHPackages                             iankok/surf-forecast-api-client - 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. iankok/surf-forecast-api-client

ActiveLibrary[API Development](/categories/api)

iankok/surf-forecast-api-client
===============================

A scraper wrapper SDK for surf-forecast.com

1.0.6(7y ago)075MITPHP

Since Mar 21Pushed 7y agoCompare

[ Source](https://github.com/ian-starts/surf-forecast-api-client-php)[ Packagist](https://packagist.org/packages/iankok/surf-forecast-api-client)[ RSS](/packages/iankok-surf-forecast-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Surf Forecast Api Client
========================

[](#surf-forecast-api-client)

A php Library for fetching wavebreak information from [surf-forecast](http://www.surf-forecast.com/).

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

[](#installation)

`composer require iankok/surf-forecast-api-client`

Features
--------

[](#features)

- Fully async so blazing fast
- Search by country
- Service provider to be able to use in Laravel
- Everything is poured in DDD design. So every call returns an array of typed classes. If you need different variables: feel free to make a PR or fork.

Samples
-------

[](#samples)

It's should be very easy use and implement in Laravel. Make sure you add `IanKok\SurfForecastApiClient\SurfForecastApiClientServiceProvider:class,`to your `app.php` under `providers`;

The final sample is how you should leverage the async functionality of this package.

```
// Get the 48 hrs forcast for canggu
$client = new SurfForecastClient('http://www.surf-forecast.com/');
$forecastRepository = new ForecastRepository($client, new ForecastMapper());
$forecastRepository->get48HrsAsync('Canggu')->wait();

// Get all available Countries
$countryRepository = new CountryRepository($client, new CountryMapper());
$countryRepository->listAsync()->wait();

// Get all wavebreaks by country id and their forecasts
$waveBreakRepository = new WaveBreakRepositoryAdapter(
    new WaveBreakMapper(new Dom()),
    new RegionMapper(new Dom()),
    $client,
    new ResponseInterpreter()
);
$waveBreaks = $waveBreakRepository->getByCountryIdAsync('213')->wait()
$foreCasts = array_map(function ($waveBreak) {
        return $forecastRepository->get48HrsAsync($waveBreak->getSlug);
    },$waveBreaks
)
all($foreCasts)->wait();
$foreCasts = array_map(function ($waveBreak) {
    return $waveBreak->wait();
    }, $waveBreaks
)
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~3 days

Total

5

Last Release

2593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4482ff5bebb183ab048ad75be89c67d525b2d9985c0483efa449d5d82437959c?d=identicon)[ian-starts](/maintainers/ian-starts)

---

Top Contributors

[![ian-starts](https://avatars.githubusercontent.com/u/28861591?v=4)](https://github.com/ian-starts "ian-starts (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/iankok-surf-forecast-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/iankok-surf-forecast-api-client/health.svg)](https://phpackages.com/packages/iankok-surf-forecast-api-client)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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