PHPackages                             snowiow/cocurl - 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. snowiow/cocurl

ActiveLibrary[API Development](/categories/api)

snowiow/cocurl
==============

Abstraction Layer for Clash of Clans API Results

0.0.1-beta(10y ago)171MITPHPPHP &gt;=7.0.0

Since Feb 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/snowiow/cocurl)[ Packagist](https://packagist.org/packages/snowiow/cocurl)[ Docs](https://github.com/snowiow/cocurl)[ RSS](/packages/snowiow-cocurl/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

COCUrl(Clash of Clans + cURL)
=============================

[](#cocurlclash-of-clans--curl)

- [Intro](#intro)
- [Installation](#installation)
- \[How to use?\](#how to use?)

Intro
=====

[](#intro)

COCUrl is a PHP framework with the goal to interact with the Clash of Clans Developer API more easily. It creates an object oriented layer above the raw cURL requests and offers Objects and Enums for the most common types returned by the CoC API. Sending requests is as easy as calling some functions on a object.

Installation
============

[](#installation)

Installation via composer is currently supported. Just add the following line to the require key in your `composer.json` file inside your project directory.

```
"require": {
  "snowiow/cocurl": "dev-master"
}
```

Instead of dev-master you can also use any specified version you like. For more informations visit the [composer website](https://getcomposer.org/doc/01-basic-usage.md)

How to use?
===========

[](#how-to-use)

Everything starts with the `Client` class. It needs an API key to be created.

```
$client = COCUrl\Client('my-api-key');
```

With the `$client` instance you are able to do all calls, that are available in the CoC API Beta. All calls are done as function calls. For example, if we want to retrieve all locations we do the following:

```
$client = COCUrl\Client('my-api-key');
$locations = $client->locations();
```

`$locations` is an array with Location objects. All the data is available as public attributes. For example we can get the name of the first location we found by executing the following line:

```
$locations[0]->name;
```

If you want to do a specialised request under the same URL it is also possible over the same method. This is mostly implemented with the help of standard parameters. This behaviour is pulled through the whole COCUrl Framework. For example, if you know the id of the Location you want to retrieve. The call would look like this:

```
$location = $client->locations(32000094); //Returns a Location object of Germany
echo $location->name; //Would print Germany
```

For a complete reference of what's implemented at this state, please refer to the [ClientTest Class](https://github.com/snowiow/cocurl/blob/master/tests/ClientTest.php).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3788d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3718461?v=4)[Marcel Patzwahl](/maintainers/snowiow)[@snowiow](https://github.com/snowiow)

---

Top Contributors

[![snowiow](https://avatars.githubusercontent.com/u/3718461?v=4)](https://github.com/snowiow "snowiow (12 commits)")

---

Tags

apicocurlClashClans

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/snowiow-cocurl/health.svg)

```
[![Health](https://phpackages.com/badges/snowiow-cocurl/health.svg)](https://phpackages.com/packages/snowiow-cocurl)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.5k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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