PHPackages                             sentimo/php-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. sentimo/php-client

ActiveLibrary[API Development](/categories/api)

sentimo/php-client
==================

A PHP client for interacting with the Sentimo API to perform sentiment analysis.

1.2.1(11mo ago)0562MITPHPPHP ^8.1

Since Sep 2Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/SentimoAi/php-client)[ Packagist](https://packagist.org/packages/sentimo/php-client)[ RSS](/packages/sentimo-php-client/feed)WikiDiscussions main Synced yesterday

READMEChangelog (8)Dependencies (7)Versions (17)Used By (2)

Sentimo PHP Client SDK
======================

[](#sentimo-php-client-sdk)

Welcome to the Sentimo PHP Client SDK! This SDK provides an easy-to-use interface for interacting with the Sentimo API, allowing you to post and retrieve customer reviews effortlessly.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Initializing the Client](#initializing-the-client)
    - [Posting Reviews](#posting-reviews)
    - [Fetching Reviews](#fetching-reviews)
- [Client Configuration](#client-configuration)
- [Error Handling](#error-handling)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

To install the Sentimo PHP Client SDK, use Composer:

```
composer require sentimo/php-client
```

Usage
-----

[](#usage)

### Initializing the Client

[](#initializing-the-client)

First, you need to initialize the Client to interact with the Sentimo API. The ClientFactory class helps you create a configured instance of the Client using your API key.

```
use Sentimo\Client\HttpClient\ClientFactory;

$apiKey = 'your-api-key-here';
$clientFactory = new ClientFactory();
$client = $clientFactory->createClient($apiKey);
```

### Posting Reviews

[](#posting-reviews)

To post reviews, you can use the postReviews method. This method accepts an array of ReviewInterface objects and an optional channel parameter.

```
use Sentimo\Client\Api\Data\ReviewInterface;
use Sentimo\Client\Api\Data\AuthorInterface;
use Sentimo\Client\Api\Data\ProductInterface;

// Example Review, Author, and Product objects (these would be created according to your implementation)
$review = new class implements ReviewInterface {
// Implement the methods of ReviewInterface
};

$reviews = [$review];
$channel = 'your-channel'; // Optional

try {
    $postedReviewIds = $client->postReviews($reviews, $channel);
    echo 'Posted Reviews: ' . implode(', ', $postedReviewIds);
} catch (LocalizedException $e) {
    echo 'Error posting reviews: ' . $e->getMessage();

}
```

### Fetching Reviews

[](#fetching-reviews)

To fetch reviews, you can use the getReviews method. You can optionally pass a ReviewGetRequestParamBuilder to filter and structure your request.

```
use Sentimo\Client\RequestParam\ReviewGetRequestParamBuilder;

$paramBuilder = new ReviewGetRequestParamBuilder();
$paramBuilder->setExternalIds(['external-id-1', 'external-id-2'])
             ->setModerationStatus('approved');

try {
    $reviews = $client->getReviews($paramBuilder, true); // true to fetch all pages
    foreach ($reviews as $review) {
        // Process each review
    }
} catch (LocalizedException $e) {
    echo 'Error fetching reviews: ' . $e->getMessage();
}
```

Client Configuration
--------------------

[](#client-configuration)

The ClientFactory automatically configures the Client instance using a Symfony DI container. You only need to provide your API key, and the factory will handle the rest.

If you need to customize the client configuration further, you can modify the ContainerFactory or use the Symfony Dependency Injection component.

Error Handling
--------------

[](#error-handling)

The SDK throws LocalizedException for errors that occur during API calls. You should catch and handle these exceptions in your application code.

```
try {
    $postedReviewIds = $client->postReviews($reviews, $channel);
} catch (LocalizedException $e) {
    // Handle the error
}
```

The `getErrors` method on the `Client` class can also be used to retrieve a list of errors encountered during operations.

```
$errors = $client->getErrors();
if (!empty($errors)) {
    foreach ($errors as $error) {
        echo $error . PHP_EOL;
    }
}
```

Contributing
------------

[](#contributing)

We welcome contributions! If you find a bug or want to add a new feature, please open an issue or submit a pull request on GitHub.

License
-------

[](#license)

This SDK is released under the MIT License. See the [LICENSE](LICENSE) file for more information.

```

```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance52

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

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

Every ~42 days

Recently: every ~59 days

Total

9

Last Release

333d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12601963?v=4)[SentimoAi](/maintainers/SentimoAi)[@SentimoAi](https://github.com/SentimoAi)

---

Top Contributors

[![SentimoAi](https://avatars.githubusercontent.com/u/12601963?v=4)](https://github.com/SentimoAi "SentimoAi (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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