PHPackages                             cuecloud/cuecloud-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. [API Development](/categories/api)
4. /
5. cuecloud/cuecloud-php

ActiveLibrary[API Development](/categories/api)

cuecloud/cuecloud-php
=====================

PHP client for the CueCloud API

081PHP

Since Dec 5Pushed 11y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

CueCloud PHP API Client Library
===============================

[](#cuecloud-php-api-client-library)

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

[](#installation)

The CueCloud PHP API client can be installed using [Composer](https://getcomposer.org/). You shouldn't have any problem installing it following [these steps](https://getcomposer.org/doc/00-intro.md#installation-nix).

### Composer

[](#composer)

You'll need to create a composer file for your project, you can do it editing it yourself or generate it answering the questions that composer would ask you after running:

```
composer init
```

You need to set the CueCloud PHP API Client as a required package for your project, using the package identifier (`cuecloud/cuecloud-php`).

Your composer.json should look something like this:

The result should be something like (pay special attention to the `require` item):

```
{
    "name": "test/my-test",
    "description": "This is a test",
    "license": "MIT License",
    "authors": [
        {
            "name": "John Doe",
            "email": "john@doe.com"
        }
    ],
    "require": {
        "cuecloud/cuecloud-php": "dev-master"
    }
}
```

Configuration
-------------

[](#configuration)

Configuration is done through the constructor of CueCloud\\API\\Client. This is mandatory and if not passed none of the API methods will work.

```
use CueCloud\API\Client as CueCloudAPI;

$apiKey = 'your_API_key';
$apiPass = 'your_secret_password';

$client = new CueCloud($apiKey, $apiPass);
```

Additional parameters could be passed: the version of the API, and the base URL as well (although this parameter is only useful for CueCloud developers).

Usage
-----

[](#usage)

Once you added the library as a requirement in composer, and set your API key and password when instantiating the CueCloud client, you are ready to call any of the methods provided:

### validateUser()

[](#validateuser)

Test method to make sure that the user has valid API credentials.

### getKeywords()

[](#getkeywords)

Request common keywords for Cues, that are returned within a list.

### getBalance()

[](#getbalance)

Request the user's current balance, in USD.

### makeDeposit($amountUSD, $ccLastFour)

[](#makedepositamountusd-cclastfour)

Given a valid credit card on file in the app, this will deposit a given amount into the user's balance.

### withdrawFunds($amountUSD)

[](#withdrawfundsamountusd)

Given a PayPal email, this will deposit the funds immediately into that user's PayPal account.

### grantBonus($cueCompletionId, $amount, $reason, $noteToSelf)

[](#grantbonuscuecompletionid-amount-reason-notetoself)

This will grant a bonus to the user who has completed a particular Cue for us.

### getPayments($paymentType, $paymentId, $noteToSelf, $page)

[](#getpaymentspaymenttype-paymentid-notetoself-page)

Get a list of payments, with some options to filter. If not filter is provided, all payments will be returned.

### approveCueCompletion($cueCompletionId)

[](#approvecuecompletioncuecompletionid)

Approve a CueCompletion that has been submitted to a user's Cue.

### declineCueCompletion($cueCompletionId)

[](#declinecuecompletioncuecompletionid)

Decline a CueCompletion that has been submitted to a user's Cue.

### cancelCue($cueId)

[](#cancelcuecueid)

Cancel a Cue that the user has posted, refunding their balance

### createCue($title, $amount, $numOpportunities, $description, $isAnonymous, $pushNotificationOnCueCompletion, $disallowAnonymous, $iFrameUrl, $urlNotificationOnCueCompletion, $emailNotificationOnCueCompletion, $lifetimeInMinutes, $timeLimitToCompleteCueInMinutes, $autoApproveCueCompletionInMinute, $noteToSelf, $keywords)

[](#createcuetitle-amount-numopportunities-description-isanonymous-pushnotificationoncuecompletion-disallowanonymous-iframeurl-urlnotificationoncuecompletion-emailnotificationoncuecompletion-lifetimeinminutes-timelimittocompletecueinminutes-autoapprovecuecompletioninminute-notetoself-keywords)

Create a new Cue. The only required parameters are the title, amount, and the number of opportunities (which defaults to 1 otherwise). An iframe URL can be specified so the user would fill a custom form on a given URL (usually your site)

### getCues($cueId, $groupId, $noteToSelf, $hasPendingCueCompletions, $status, $page)

[](#getcuescueid-groupid-notetoself-haspendingcuecompletions-status-page)

Get a list of all the Cues the use has created. Some filters are available as parameters.

### assignCue($cueId)

[](#assigncuecueid)

Try and check-in or check-out a Cue depending on whether the Cue is already checked out by that user.

### getCueCompletion($cueId, $cueCompletionId, $status, $page)

[](#getcuecompletioncueid-cuecompletionid-status-page)

Get CueCompletions for a particular Cue, or filter by CueCompletion, or status.

### submitCueCompletion($assignmentId, $answerText, $videoUrl, $videoThumbnail, $imageUrl, $isAnonymous)

[](#submitcuecompletionassignmentid-answertext-videourl-videothumbnail-imageurl-isanonymous)

Submit the CueCompletion data, though in production the method will block any requests without an HTTP\_REFERER.

Running Tests
-------------

[](#running-tests)

A collection of integration tests is included. To execute them use phpunit, which should be already installed via composer because it's a development dependency of the CueCloud PHP API client:

```
phpunit ./tests/
```

This will use the settings included on phpunit.xml.

Alternatively (useful only for CueCloud developers) the integration tests could be ran against their local development server using the settings on phpunit.local.xml, executing:

```
phpunit -c phpunit.local.xml ./tests/
```

Copyright and license
---------------------

[](#copyright-and-license)

Copyright 2014 CueCloud. Licensed under the MIT License.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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/5d1cbcc219df2fc7fd2415be310b6f625023d794a2ac89864dda476ca1d79b39?d=identicon)[cuecloud](/maintainers/cuecloud)

---

Top Contributors

[![cuecloud](https://avatars.githubusercontent.com/u/9973061?v=4)](https://github.com/cuecloud "cuecloud (3 commits)")[![mmolina](https://avatars.githubusercontent.com/u/743386?v=4)](https://github.com/mmolina "mmolina (2 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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