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 2w 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 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

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

2646d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28861591?v=4)[Ian Kok](/maintainers/ian-starts)[@ian-starts](https://github.com/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

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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