PHPackages                             celpax/dailypulse - 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. celpax/dailypulse

ActiveLibrary[API Development](/categories/api)

celpax/dailypulse
=================

Celpax DailyPulse PHP API Client

v1.0.13(8y ago)03381PHPPHP &gt;=5.5

Since Oct 22Pushed 8y ago2 watchersCompare

[ Source](https://github.com/celpax/dailypulse-php)[ Packagist](https://packagist.org/packages/celpax/dailypulse)[ RSS](/packages/celpax-dailypulse/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (12)Used By (0)

DailyPulse Client API
=====================

[](#dailypulse-client-api)

This is the Celpax's PHP DailyPulse Client API. Note that:

It matches pretty much the [NodeJS API](https://github.com/celpax/dailypulse) Client.

API Client Architecture
-----------------------

[](#api-client-architecture)

- The client connects to the server using JSON/REST web services.
- All requests run over HTTPS and the URI is signed with a timestamped cryptographic token implemented using HMAC-SHA512.
- The client uses internally [Guzzle](http://guzzle.readthedocs.org) to send the REST requests and parse the received JSON.
- A Response object encapsulates the downloaded JSON, HTTP Status and exception information from either client or server side.

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

[](#installation)

The PHP DailyPulse client is distributed as a [composer package](https://packagist.org/packages/celpax/dailypulse).

You can either include the a dependency in your `composer.json` file or use composer to download the code to your project.

To install the package to your project do

```
php composer.phar require celpax/dailypulse
```

That will download the package and all the dependencies in to the vendor directory. Remember to:

```
include 'vendor/autoload.php';
```

If you also use composer, you just need to add the dependency to your `composer.json` as

```
{
    "require": {
        "celpax/dailypulse": "~1.0"
    }
}
```

Check the [Composer Package Manager](https://getcomposer.org/) for additional information.

Instanciate the client
----------------------

[](#instanciate-the-client)

In order to instanciate the dailypulse client and start making request you need to do:

```
use Celpax\Dailypulse\Client;

DEFINE('ACCESS_KEY_ID','your-access-key-here');
DEFINE('SECRET_ACCESS_KEY','your-secret-access-key-here');

$dailyPulseClient=new Client(ACCESS_KEY_ID,SECRET_ACCESS_KEY);
```

You can download your access and secret api keys from DailyPulse dashboard.

Get your sites
--------------

[](#get-your-sites)

DailyPulse can be deployed on one or more company sites. In either case you will need to know the Site ID before you can download metrics related to it.

You can get your sites as follows:

```
    $response=$dailyPulseClient->getSites();
    $site_id=$response->json()[0]['id'];
```

Mood KPI
--------

[](#mood-kpi)

You can retrieve the latest calculated Mood KPI for a give site as follows:

```
    $response=$dailyPulseClient->getMoodKPI($site_id);
    $green=$response->json()['green'];
```

Note that in some cases the Mood KPI cannot be calculated (for example during rollout) and will be returned as null. A date member will also be included indicating when the Mood KPI was last updated.

Alternatively, you can retrieve the latest calculated global Mood KPI of all the sites of the account as follows:

```
    $response=$dailyPulseClient->getGlobalMoodKPI();
    $green=$response->json()['green'];
```

Historical Mood KPI
-------------------

[](#historical-mood-kpi)

You can retrieve the historical calculated Mood KPI for a given site and the number of days to fetch since today as follows:

```
   $response=$dailyPulseClient->getHistoricalMoodKPI($site_id, $number_of_days);
   $green=$response->json()[0]['green'];
```

The maximum number of allowed days to be fetched can be configured in the Celpax Dashboard console. You need administrator privileges for accessing to the configuration section.

Alternatively you can retrieve the historical calculated global mood KPI of all the sites of the account as follows:

```
   $response=$dailyPulseClient->getHistoricalGlobalMoodKPI($number_of_days);
   $green=$response->json()[0]['green'];
```

Pulses in a Typical Day
-----------------------

[](#pulses-in-a-typical-day)

Dailypulse will track how many pulses are registered in a typical day. DailyPulse will detect and exclude from this statist days such as weekends in which a couple of people turn up to work, or company parties when there might be an unusual number of pulses.

Again, pulses per typical day might not be calculated for a given site yet, in which case null can be returned.

You can get it in a similar way by doing:

```
    $response=$dailyPulseClient->getPulsesPerTypicalDay($site_id);
    $pulses=$response->json()['pulses'];
});
```

A date member will also be returned indicating when the pulses per typical day was last updated.

Alternatively, you can retrieve the global pulses in a typical day of all the sites of the account as follows:

```
    $response=$dailyPulseClient->getGlobalPulsesPerTypicalDay();
    $pulses=$response->json()['pulses'];
});
```

Historical Pulses in a Typical Day
----------------------------------

[](#historical-pulses-in-a-typical-day)

You can retrieve the historical Pulses in a Typical day for a given site and the number of days to fetch since today as follows:

```
    $response=$dailyPulseClient->getHistoricalPulsesPerTypicalDay($site_id, $number_of_days);
    $pulses=$response->json()[0]['pulses'];
```

The maximum number of allowed days to be fetched can be configured in the Celpax Dashboard console. You need administrator privileges for accessing to the configuration section.

Alternatively, you can retrieve the historical global pulses per typical day of all the sites of the account as follows:

```
    $response=$dailyPulseClient->getHistoricalGlobalPulsesPerTypicalDay($number_of_days);
    $pulses=$response->json()[0]['pulses'];
```

User Interface Design
---------------------

[](#user-interface-design)

We have released user interface elements, such as: colours, fonts, widgets available in the github project: [DailyPulse-Resources](https://github.com/celpax/dailypulse-resources)

The resources provided match the User Interface of the DailyPulse Dashboard.

Testing
-------

[](#testing)

An echo test method has also been include so that you can test your setup as much as you want before pulling real data.

You can use it as follows, for example in one of your unit tests:

```
    $response=$this->dailyPulseClient->echoMsg('hello');
    $this->assertFalse($response->isException());
    $this->assertEquals(200, $response->statusCode());
    $obj=$response->json();
    $this->assertEquals('hello', $obj['msg']);
```

Additional information
----------------------

[](#additional-information)

The tests run through all the API calls available, check them.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~136 days

Recently: every ~306 days

Total

10

Last Release

3034d ago

PHP version history (2 changes)v1.0.3PHP &gt;=5.3.3

v1.0.13PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/20de80434bc89b694c82e4344f675902b2e5fb8244b224fd27899657ae07978f?d=identicon)[celpax](/maintainers/celpax)

---

Top Contributors

[![rvalle](https://avatars.githubusercontent.com/u/412837?v=4)](https://github.com/rvalle "rvalle (2 commits)")[![webcraft-steeve](https://avatars.githubusercontent.com/u/20354463?v=4)](https://github.com/webcraft-steeve "webcraft-steeve (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/celpax-dailypulse/health.svg)

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

###  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.1k33](/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

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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