mixislv/reamaze-php-sdk

A PHP library for the Reamaze Core API

v2.2.1 2022-12-08 19:44 UTC

This package is auto-updated.

Last update: 2024-12-09 00:12:59 UTC


README

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub license GitHub release Build Status

A PHP client library for accessing Reamaze API

This PHP library allows you to easily integrate Reamaze with PHP.

Requirements

The following PHP extension is required:

  • json
  • curl

Installation

Run the following to include this via Composer

composer require "mixislv/reamaze-php-sdk" "^2.0"

Or by adding the following to your composer.json:

"require": {
    "mixislv/reamaze-php-sdk": "^2.0"
}

Usage

use mixisLv\Reamaze\Api as ReamazeApi;
use mixisLv\Reamaze\Exceptions\ApiException;
use mixisLv\Reamaze\Params\Articles\GetParams;

$reamaze = new ReamazeApi(REAMAZE_BRAND, REAMAZE_LOGIN, REAMAZE_TOKEN);

try {
    $response = $reamaze->articles->get(new GetParams(['slug' => 'test']));
    var_dump($response);
} catch (ApiException $e) {
    var_dump($e->getMessage());
}

Check out examples directory for more usage examples.