PHPackages                             joeyrivera/badgeville-php - 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. joeyrivera/badgeville-php

ActiveLibrary

joeyrivera/badgeville-php
=========================

Badgeville Cairo SDK for PHP

15PHP

Since Aug 27Pushed 11y ago1 watchersCompare

[ Source](https://github.com/joeyrivera/badgeville-php)[ Packagist](https://packagist.org/packages/joeyrivera/badgeville-php)[ RSS](/packages/joeyrivera-badgeville-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Badgeville Cairo SDK for PHP
==============================

[](#badgeville-cairo-sdk-for-php)

version 0.1 - NOT STABLE

This ia a work in progress and lots of things will be changing still. Hopefully it won't take too long to get a beta ready. The idea is to provide a library that is easy to use to interact with the Cairo API.

\##Usage keep in mind functionality will probably change until beta

To install via composer:

```
{
    "require": {
        "joeyrivera/badgeville-php": "dev-master"
    }
}
```

The best way to get started is to test the find/findall utility under examples/index.php. To use, create a copy of examples/config.php.dist and save it as examples/config.php. Next update the params array with your info so it looks like:

```
$params = [
    'url' => 'https://sandbox.badgeville.com/cairo',
    'apiVersion' => 'v1',
    'apiKey' => '234lkj23l4kj23l4l2j34lk23j4lk23l4', // get this from your badgeville dashboard
    'siteId' => '23k4lj23kl4j23lkj4', // get this from your badgeville dashboard
];
```

Now you can direct your brower to the examples folder and use the utility.

To start using the library you need create a site instance passing it the site id and setting the client to a GuzzleHttp\\Client instance.

```
use Badgeville\Api\Cairo\Sites;
$site = new Sites($siteId);
$site->setClient(new GuzzleHttp\Client($params));
```

Example of site specific calls:

```
$player = $site->players()->find('joey@rivera.com');

$player = $site->players()->find('234lkj234lkj234lkj', [
    'includes' => 'rewards,positions,activities'
]);

$players = $site->players()->findAll();

$player = $site->players()->create([
    'name' => 'Joey Tester2',
    'email' => 'joeyrivera@air-watch.com2'
]);

$player->display_name = 'testing2';
$player->save();

$activity = $site->players('234lkj234lkj234lkj')->activities()->create('logged');
```

\###Todos

- unit testing
- metadata mapping?
- monolog
- decide on exceptions
- need error handling, resources should indicate what they can do ex: create vs find

considering the following changes

- so all classes are singular named

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6db859dbc1198c3fa3f7a44c3e8381f9595694a32467d097188d70bb4ce625ef?d=identicon)[joeyrivera](/maintainers/joeyrivera)

---

Top Contributors

[![joeyrivera](https://avatars.githubusercontent.com/u/505170?v=4)](https://github.com/joeyrivera "joeyrivera (35 commits)")

### Embed Badge

![Health badge](/badges/joeyrivera-badgeville-php/health.svg)

```
[![Health](https://phpackages.com/badges/joeyrivera-badgeville-php/health.svg)](https://phpackages.com/packages/joeyrivera-badgeville-php)
```

PHPackages © 2026

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