定制 qqzii/map-client 二次开发

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

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

qqzii/map-client

最新稳定版本:1.1.0

Composer 安装命令:

composer require qqzii/map-client

包简介

PHP client for MAP API

README 文档

README

Installation

Install the latest version with

composer require qqzii/map-client

Basic Usage

Init config file map.php with simple structure

[
    'url' => 'your.map.url',
    'api_version' => 'v1',
    'auth' => [
        'login' => 'your_login',
        'secret' => 'your_secret_key',
    ],
    'logger' => [
        'name' => 'name_of_your_logger',
        'filepath' => 'path/to/your/logger/file.log',
    ],
];

Basic way of interaction

$mapService = new MapService(config('map'));

$indexQueryParamsExample = [
    'per_page' => 10,
    'page' => 1,
    'with' => ['topics'],
    'filters' => ['first_name' => 'Olivia']
];

$mapService->getCustomers($indexQueryParamsExample)

Available methods for interactions with MAP

  • Actions with customers

public function getCustomers(array $queryParams = []): array
public function getCustomer(string $customerId, array $queryParams = []): array
public function createCustomer(array $bodyArgs = []): array
public function updateCustomer(string $customerId, array $bodyArgs = []): array
public function deleteCustomer(string $customerId): array
public function initCustomerEvent(string $customerId, string $eventSlug, array $bodyArgs = []): array
public function attachCustomerToSegment(string $customerId, string $segmentId): array
public function detachCustomerFromSegment(string $customerId, string $segmentId): array
  • Actions with segments

public function getSegments(array $queryParams = []): array
public function getSegment(string $segmentId, array $queryParams = []): array
public function createSegment(array $bodyArgs = []): array
public function updateSegment(string $segmentId, array $bodyArgs = []): array
public function deleteSegment(string $segmentId): array
  • Actions with topics

public function getTopics(array $queryParams = []): array
public function getTopic(string $topicId, array $queryParams = []): array
  • Actions with messages

public function getMessages(array $queryParams = []): array
public function getMessage(string $messageId, array $queryParams = []): array
public function initMessageEvent(array $bodyArgs = []): array
  • Actions with devices

public function createDevice(array $bodyArgs = []): array
public function updateDevice(string $deviceId, array $bodyArgs = []): array

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-29