stamplia/stamplia-php

A PHP client for the Stamplia API

v1.0.1 2015-09-14 12:32 UTC

This package is not auto-updated.

Last update: 2025-06-11 12:22:54 UTC


README

SensioLabsInsight Codeship Status for Stamplia/stamplia-php

stamplia-php

A PHP library to access the Stamplia API. It requires PHP 5.4+.

Setup

Using composer you can add the following to your composer.json file:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/Stamplia/stamplia-php.git"
    }
],
"require": {
    "php": ">=5.4.0",
    "Stamplia/stamplia-php": "~1.0"
},
"minimum-stability": "stable",
"config": {
    "process-timeout": 3600
}

Then in your PHP code include the composer autoloader, something similar to this:

<?php
require_once 'vendor/autoload.php';

Usage

To instantiate the client it's pretty straightforward:

$client = new \Stamplia\ApiClient();

Here's how to list templates available on our marketplace:

$templates = $client->getTemplates();

All method parameters need to be set within a single array as the function parameter.

To log in and then be able to access private methods (user methods):

$client->login(array(
    'email'         => '**',
    'password'      => '**',
    'app_id'        => '**',
    'app_secret'    => '**'
));

To see all methods available with this ApiClient you can use the following tool from the command line:

php doc.php | more

Please read our API documentation for a more precise description of the parameters that each method accepts and their response.