Skip to content

mixisLv/reamaze-php-sdk

Repository files navigation

Reamaze PHP SDK

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.