sanduhrs/metis-soap-client

Metis (VG Wort) Soap API客户端实现。

1.0.0 2020-09-19 10:41 UTC

This package is auto-updated.

Last update: 2024-09-19 19:32:52 UTC


README

此库提供PHP实现的Metis Soap服务。

Metis是由VG WORT提供的服务,旨在帮助作者和出版商统计在互联网上发布的文档的使用情况。

标准

  • PSR-1: 基本编码规范
  • PSR-4: 改进的自动加载
  • PSR-12: 扩展编码风格指南

安装

composer require sanduhrs/metis-soap-client

使用示例

初始化

use sanduhrs\Metis\MetisClientFactory;

$login = $_ENV['METIS_LOGIN'];
$password = $_ENV['METIS_PASSWORD'];

$client = MetisClientFactory::factory(
  'https://tom.vgwort.de/services/1.0/pixelService.wsdl',
  [
    'login' => $login,
    'password' => $password,
  ]
);

订购像素

$count = 1;
$response = $client->orderPixel(new OrderPixelRequest($count));

$response->getDomain(); // vg00.met.vgwort.de
$response->getOrderDateTime(); // 197001010000
foreach ($response->getPixels() as $pixel) {
  $pixel->getPublicIdentificationId();  // 9dde9503649dh46xc89dk682422686e7
  $pixel->getPrivateIdentificationId(); // 463fbf719dd96er77kla97622po27185
}

像素概述

$offset = 0;
$type = 'MINDESTZUGRIFF';
$response = $client->pixelOverview(new PixelOverviewRequest($offset, $type));

$response->getOffset; // 0
$response->getAmount; // 6
foreach ($response->getPrivateIdentificationId() as $privateIdentificationId) {
  $privateIdentificationId; // e8cf1jd89ie34ok56nh21sd876adf536
}

许可证

PHP Metis SOAP客户端版权(C)2020 Stefan Auditor stefan@auditor.email

本程序是自由软件;您可以按照自由软件基金会发布的GNU通用公共许可证的条款重新分发和/或修改它;无论是许可证的第2版,还是(根据您的选择)该许可证的任何后续版本。

本程序的分发是希望它将是有用的,但没有提供任何保证;甚至没有关于其适销性或特定用途的暗示保证。有关详细信息,请参阅GNU通用公共许可证。

您应该已经收到一份GNU通用公共许可证副本;如果没有,请写信给自由软件基金会,Inc.,51 Franklin Street,第五层,波士顿,MA 02110-1301,美国。