定制 pashamesh/uiscom-api-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pashamesh/uiscom-api-client

最新稳定版本:0.5.0

Composer 安装命令:

composer require pashamesh/uiscom-api-client

包简介

PHP binding for UIScom (formerly CoMagic) API

README 文档

README

Unit tests Static analysis Code style License: MIT Latest Version on Packagist Total Downloads

UIS (CoMagic) PHP client for the following APIs:

Requirements

This package requires PHP 7.4 or above.

Installation

To get started, install package via the Composer package manager:

composer require pashamesh/uiscom-api-client

Usage

Configuring

Array is using to configure Rest API and Call API clients.

$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',
];

You also need to change domain if you client of Uiscom by specifying endpoint:

use Uiscom\CallApiConfig;

$config = new CallApiConfig('login', 'password', 'access_token')

Do not forget to add Call API permissions to user if you want to use login and password authorization for Call API.

Call API

API Methods names need to be specified in CamelCase

use Uiscom\CallApiConfig;
use Uiscom\CallApiClient;

$config = new CallApiConfig('login', 'password', 'access_token');
$callApi = new CallApiClient($config);
var_dump($callApi->listCalls());

It's possible to get response metadata after API request is made

var_dump($callApi->metadata());

Data API

API Methods names need to be specified in CamelCase

use Uiscom\DataApiConfig;
use Uiscom\DataApiClient;

$config = new DataApiConfig('access_token');
$dataApi = new DataApiClient($config);
var_dump(
    $dataApi->getCallsReport([
        'date_from' => '2025-01-10 00:00:00',
        'date_till' => '2025-01-13 23:59:59'
    ])
);

It's possible to get response metadata after API request is made

var_dump($dataApi->metadata());

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-22