承接 der-spiegel/ww-assets-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

der-spiegel/ww-assets-client

Composer 安装命令:

composer require der-spiegel/ww-assets-client

包简介

PHP client for the WoodWing Assets (formerly: Elvis DAM) system https://www.woodwing.com/en/products/woodwing-assets

README 文档

README

WoodWing Assets is a DAM (Digital Asset Management) system. This PHP client library uses its REST API.

This is not an official library supplied by the WoodWing vendor. It has been developed during the WoodWing Assets implementation at the German SPIEGEL Gruppe, 2019-2020.

Functionality

Installation

Use Composer to add this library your project’s composer.json file:

$ composer require der-spiegel/ww-assets-client

Quick test

Here’s how to do a quick test, starting from scratch with a new project (Docker required):

Install dependencies using Composer

$ mkdir MyExample && cd MyExample
$ docker run --rm --interactive --tty \
  --volume $PWD:/app \
  --volume ${COMPOSER_HOME:-$HOME/.composer}:/tmp \
  composer/composer require der-spiegel/ww-assets-client monolog/monolog

Copy and edit the example script

$ cp vendor/der-spiegel/ww-assets-client/UsageExample.php MyExample.php

Edit your copy, setting the correct Assets URL, username (API user preferred) and password in this section:

$assetsConfig = AssetsConfig::create(
    'https://assets.example.com/', // Assets URL (without app/ or services/ postfix)
    'username',                    // Assets user name (API user preferred)
    'password'                     // That user's password
);

The example script performs a simple search across all assets (visible for that user) and returns the first 50 asset IDs – you can leave it as is for a first test:

$assetsClient = new AssetsClient($assetsConfig, $logger); // Create client

$request = new SearchRequest($assetsClient,               // Create search request
        q: '',                                            // Assets query
        metadataToReturn: ['']                            // Metadata fields to return
);

$response = $request();                                   // Perform search

foreach ($response->hits as $assetResponse) {             // Loop through results
    echo $assetResponse->id . "\n";                       // Access asset metadata
}

Then run your copy

$ docker run -it --rm --name assets-client-example \
  --volume "$PWD":/usr/src/myapp --workdir /usr/src/myapp \
  php:cli php MyExample.php

Development

See Running tests for instructions on how to run unit and integration tests.

To regenerate the documentation in docs/_build/html from the source files, run Sphinx:

$ docker run --rm --volume "$PWD":/usr/src/myapp --workdir /usr/src/myapp/docs sphinxdoc/sphinx:5.3.0 make html

Authors

License

This library is licensed under the MIT License - see the LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固