Skip to content

WebMerge.me REST API resources

Notifications You must be signed in to change notification settings

Morning-Train/webmerge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebMerge

Requirements

The PHP library depends on PHP 5.5 or higher.

Installation

Composer

If you're using Composer, you can simply add a dependency droath/webmerge to your project's composer.json file.

{
    "require": {
        "droath/webmerge": "dev-master"
    }
}

Usage

Configuration

Set the WebMerge API key and secret, which are defined within your WebMerge Account.

<?php

$config = new \WebMerge\Config(
    '3K83KMN1AL6M1MXMVVCKR66BP9NA', 'I51BBZ5R'
);
$resource = new \WebMerge\Resource($config, '\WebMerge\Resources\Document');

Get Document

Retrieve a WebMerge resource document by ID.

<?php
...
$resource = new \WebMerge\Resource($config, '\WebMerge\Resources\Document');

$response = null;
try {
    $response = $resource(123456)->get();
} catch (Exception $e) {
    // error handling
}

$data = $response->extract()->asArray();

var_dump($data);

Sponsored By

Isovera Logo

About

WebMerge.me REST API resources

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%