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
PHP Wrapper for The Imaging Source Download System Web API
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
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2018-05-09
