定制 theimagingsource/tisd-sdk 二次开发

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

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

theimagingsource/tisd-sdk

Composer 安装命令:

composer require theimagingsource/tisd-sdk

包简介

PHP wrapper for The Imaging Source Download System Web API. Authored and supported by The Imaging Source Europe GmbH.

README 文档

README

Logo

PHP Wrapper for The Imaging Source Download System Web API

Coverage Status Scrutinizer Code Quality Total Downloads Latest Stable Version

The Imaging Source produces a large number of downloadable files (drivers, end-user software, documentation, images etc.). These resources are published at dl.theimagingsource.com and are available via a JSON-based API. In addition to encapsulating the functionality of the JSON-based API, this component library provides several helper objects to make access to The Imaging Source downloads as simple and quick as possible.

Installation

Use Composer to install the SDK:

composer require theimagingsource/tisd-sdk ^5.0

Sample Endpoints

Return all supported locales

Return all supported contexts

Return meta information and statistics

Return all data (consolidated)

Return all packages in "Downloads"

Return all packages in "Downloads" -> "Drivers"

Return package matching product code ID

Return package matching package ID

Return package matching UUID

Programming Samples

The SDK ships with comprehensive samples illustrating all functionality. Please take a look in the /bin directory.

Unit Tests

The SDK ships with complete unit tests. Simply run composer test in the root directory.

JSON Structure

root
  categories
    sections
      packages
        package

Loop through the JSON structure in PHP

<?php

use Tisd\Sdk\Sdk;

$sdk = new Sdk();

$packages = $sdk->getPackages();

foreach ($packages['children'] as $categoryId => $categories) {
    foreach ($categories['children'] as $sectionId => $sections) {
        foreach ($sections['children'] as $packageId => $package) {
            // $latestPackageVersion = array_shift($package['versions']);
        }
    }
}

foreach ($packages['children'] as $categoryId => $categories) {
    foreach ($categories['children'] as $sectionId => $sections) {
        foreach ($sections['children'] as $packageId => $package) {
            // $latestPackageVersion = array_shift($package['versions']);
        }
        if (0 === count($packages['children'][$categoryId]['children'][$sectionId]['children'])) {
            unset($packages['children'][$categoryId]['children'][$sectionId]);
        }
    }
    if (0 === count($packages['children'][$categoryId]['children'])) {
        unset($packages['children'][$categoryId]);
    }
}

?>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-05-09