PHPackages                             mosai-co/meride-php-sdk - 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. mosai-co/meride-php-sdk

ActiveLibrary[API Development](/categories/api)

mosai-co/meride-php-sdk
=======================

Libraries to interact with Meride platform

1.0.0(3y ago)0150proprietaryPHPPHP ^7.2|^8.0

Since Jan 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mosai-co/meride-php-sdk)[ Packagist](https://packagist.org/packages/mosai-co/meride-php-sdk)[ Docs](https://www.meride.tv/docs)[ RSS](/packages/mosai-co-meride-php-sdk/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (5)Dependencies (2)Versions (24)Used By (0)

General PHP libraries for Meride
================================

[](#general-php-libraries-for-meride)

General PHP libraries for Meride that interacts with Meride's APIs, with Meride's encoders and gives web functionalities.

The packages included are:

- **Api** for communications with Meride's APIs
- **Web** for producing HTML code (eg. integrating an embed)
- **Storage** for interacting with the storage

### INSTALLATION

[](#installation)

`composer require mosai-co/meride-php-sdk`

it will require the [public composer repository](https://packagist.org/packages/mosai-co/meride-php-sdk)

The minimum requirement for PHP will be version 7.2

### DEVELOPMENT INSTALLATION

[](#development-installation)

- clone the repo and go the the project folder
- run `composer install`
- if you are not using a system that automatically includes composer autoload, include it in your page (e.g. `include './vendor/autoload.php'`) and you are ready to use the library.

### TESTING

[](#testing)

1. create MERIDE\_URL environment on the system with `export MERIDE_URL="{{URL}}"` where {{URL}} will be the CMS to test (e.g. )
2. create MERIDE\_AUTH\_CODE environment on the system with `export MERIDE_AUTH_CODE="{{AUTH_CODE}}"` where {{AUTH\_CODE}} will be the authorization code to call the API
3. create MERIDE\_STORAGESERVICE\_URL environment on the system with `export MERIDE_STORAGESERVICE_URL="{{STORAGESERVICE_URL}}"` where {{STORAGESERVICE\_URL}} is the address (base URL) of the storage service
4. create MERIDE\_AUTH\_USER environment on the system with `export MERIDE_AUTH_USER="{{AUTH_USER}}"` where {{AUTH\_USER}} is the desired client ID
5. create MERIDE\_VIDEO\_ID environment on the system with `export MERIDE_VIDEO_ID="{{VIDEO_ID}}"` where {{VIDEO\_ID}} is the desired video ID that will be tested (it must exist on the test platform)
6. create MERIDE\_STORAGE\_PROTOCOL enviroment specifying if the storage HTTP protocol for the storage URL is http or https
7. launch `./testall.sh` from the root directory of the project

### DOCUMENTATION GENERATION

[](#documentation-generation)

To produce an internal documentation phpdoc is required on the system.

To see the documentation of the project launch this from the command line and access to the docs/ directory with a browser

`phpdoc -d ./src/ -t ./docs`

or launch the script `./generatedocs.sh`

### PUBLIC DOCUMENTATION

[](#public-documentation)

To read the public documentation go to the [Meride's documentation page](https://www.meride.tv/docs/section.html?route=sdk__php/index)

### INITIALIZATION

[](#initialization)

```
use Meride\Api;

// substitute with the URL of your own CMS path
define('MERIDE_URL', "https://cms.meride.tv/CLIENT_NAME");
// define which API version to use (default v2)
define('MERIDE_VERSION', 'v2');
// define your access token, visible inside the CMS
define('MERIDE_ACCESS_TOKEN', 'MERIDE_AUTH_CODE');

// instantiate an API object
$merideApi = new Api(MERIDE_ACCESS_TOKEN, MERIDE_URL, MERIDE_VERSION);

```

### GET request (single)

[](#get-request-single)

```
$video = $merideApi->get('video', 1234);
echo $video->title;
```

### GET request (collection)

[](#get-request-collection)

```
$videoCollection = $merideApi->all('video');
// numbers of records in the collection
$videoCount = $videoCollection->count();
// iterating on the records
foreach($videoCollection as $video) {
    echo $video->title."\r\n";
}
```

### ERROR MANAGEMENT

[](#error-management)

```
// Reading a non-existing video
$video = $merideApi->read('video', 9999);
if ($video->hasErrors())
{
    // some error occured
    $apiResponse = $video->getApiResponse();
    $error = $apiResponse->error;
    if ($apiResponse->httpCode == 404)
    {
        echo "Record not found";
    }
    else
    {
        echo "\r\nError message: ".$error->message;
        echo "\r\nError code: ".$error->errorCode;
    }
}
else
{
    if ($video->isEmpty())
    {
        echo "No data available as the response is empty";
    }
    else
    {
        echo "The video has ID ".$video->id." and title ".$video->title;
    }
}
```

### WEB FEATURES

[](#web-features)

generate Meride's div

```
use Meride\Web\Embed as Embed;
echo Embed::div(array(
    'embedID' => '1594',
    'clientID' => 'webink',
    'width' => '640',
    'height' => '400',
    'bulkLabel' => 'testLabel',
    'autoPlay' => 'true',
    'responsive' => 'true'
));
```

generate Meride's iframe

```
use Meride\Web\Embed as Embed;
echo Embed::iframe(array(
    'embedID' => '1594',
    'clientID' => 'webink',
    'width' => '640',
    'height' => '400',
    'bulkLabel' => 'testLabel'
));
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity76

Established project with proven stability

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 ~58 days

Recently: every ~106 days

Total

23

Last Release

1427d ago

Major Versions

0.1.12 → 1.0.02022-07-26

PHP version history (2 changes)0.1.0PHP ^7.2

1.0.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/09c63a9ea3471bd17a937f9d756017f594bd57acd0850d3cd7aa7a614a22a2c8?d=identicon)[mosaico](/maintainers/mosaico)

---

Tags

apisdkMosaico

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mosai-co-meride-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mosai-co-meride-php-sdk/health.svg)](https://phpackages.com/packages/mosai-co-meride-php-sdk)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

46784.5k5](/packages/deepseek-php-deepseek-php-client)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

138106.8k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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