ipwsystems/metazo-sdk-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ipwsystems/metazo-sdk-php

最新稳定版本:v1.0.7

Composer 安装命令:

composer require ipwsystems/metazo-sdk-php

包简介

PHP api for working with IPW Metazo.

README 文档

README

PHP client for the IPW Metazo api.

https://metazoapi.support.ipw.dk/

Installation

composer require ipwsystems/metazo-sdk-php

Usage

Setup

use IpwSystems\MetazoApi\Client;
use IpwSystems\MetazoApi\Configuration;

$config = new Configuration([
    'endpoint' => 'https://.../metazo/v1/',
    'user' => 'api user',
    'password' => 'api user password',
    'key' => 'api key',
    'site' => 1
]);

$client = new Client($config);

Authentication

if ($client->authenticate()) {
    // authenticated...
}

Here a list and a model request.

List

$client->list('user', [
    'search' => 'Peter',
    'searchfield' => 'name',
    'search' => 'LIKEEND',
]);

Model

$client->model('create', [
    'datatype' => 'form1234',
    'f001' => 'test',
    'f002' => 'test 1',
    'f003' => 'test 2',
]);

Here the full list of methods. See the api documentation for details.

$client->ping(): string;
$client->authenticate(): bool;
$client->validateToken(): bool
$client->revokeToken(): bool
$client->datatypes(): array
$client->explain(string $dataType): array
$client->model(string $model, array $options): array

$options = [
    'datatype' => '',
    'model' => '',
    'objectId' => null,
];
$client->list(string $datatype, array $options): array;

$options = [
    'datatype' => '',
    'search' => '',
    'searchfield' => '',
    'searchcomp' => '',
    'searchandor' => 'AND',
    'fields' => '',
    'limit' => 20,
    'offset' => 0,
];
$client->read(int $objectId): array
$client->uploadFiles(int $parentId, array $files): array

// Here `$files` is an array of full paths to files to upload and attach to an object.

$client->downloadFile(int $objectId, string $destination): <data stream>
$client->filter(int $filterId): array
$client->filterCount(int $filterId): int

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2023-04-14