2017 © Pedro Peláez
 

library comagic-api

php binding for CoMagic API

image

zpearl/comagic-api

php binding for CoMagic API

  • Monday, April 3, 2017
  • by zpearl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

CoMagic API php client

CoMagic php client for: - Rest API https://www.comagic.ru/support/api/ - Call API, (*1)

Installation

To get started, install package via the Composer package manager:, (*2)

composer require zpearl/comagic-api, (*3)

Usage

Configuring

Array is using to configure Rest API and Call API clients., (*4)

$config = [
    // required for Rest API and optional for Call API
    'login' => 'put_login_here',
    'password' => 'put_password_here',
    // required for Call API if login and password not specified
    'access_token' => 'put_access_token_here',
];

Do not foreget to add Call API permissions to user if you want to use login and password authorization for Call API, (*5)

Rest API

use CoMagic\RestApiClient;

$restApi = new RestApiClient($config);
var_dump(
    $restApi->call(['date_from' => '2017-01-10', 'date_till' => '2017-01-13'])
);

Call API

API Methods names need to be specified in CamelCase, (*6)

$callApi = new CallApiClient($config);
var_dump($callApi->listCalls());

It's possible to get response metadata after API request is made, (*7)

var_dump($callApi->metadata());

The Versions

03/04 2017

dev-master

9999999-dev

php binding for CoMagic API

  Sources   Download

The Requires

 

by Eugen Pestov

03/04 2017

0.2.4

0.2.4.0

php binding for CoMagic API

  Sources   Download

The Requires

 

by Eugen Pestov

03/04 2017

0.2.3

0.2.3.0

php binding for CoMagic API

  Sources   Download

The Requires

 

by Eugen Pestov

28/03 2017

0.2.2

0.2.2.0

php binding for CoMagic API

  Sources   Download

The Requires

 

by Eugen Pestov

30/01 2017

0.2.1

0.2.1.0

php binding for CoMagic API

  Sources   Download

The Requires

 

by Pasha Mesh

30/01 2017

0.2.0

0.2.0.0

php binding for CoMagic API

  Sources   Download

The Requires

 

by Pasha Mesh

26/01 2017

0.1.0

0.1.0.0

php binding for CoMagic API

  Sources   Download

The Requires

 

by Pasha Mesh