scottbass3/harbor-api-client
最新稳定版本:v1.0.1
Composer 安装命令:
composer require scottbass3/harbor-api-client
包简介
This package provides API models and a client for Harbor
README 文档
README
Harbor OpenAPI client
This package provides a client for Harbor. It was auto-generated with Jane based on the Harbor API v2.
Rebuilding the client library
Jane provides commands for generating the client code. Switch to this package's directory and install Composer dependencies. You can then run a command for generating the code:
composer update bin/jane-openapi-generate
Usage
The client is instantiated using the create() factory method. The
following example shows how to create a project, authenticating with
username and password of a Harbor robot user:
use Http\Client\Common\Plugin\AddHostPlugin; use Http\Client\Common\Plugin\AddPathPlugin; use Http\Client\Common\Plugin\AuthenticationPlugin; use Http\Message\Authentication\BasicAuth; use Scottbass3\Harbor\Api\Model\ProjectReq; … $client = \Scottbass3\Harbor\Api\Client::create( null, [ new AddHostPlugin( $endpointUri ), new AddPathPlugin( $endpointUri ), new AuthenticationPlugin( new BasicAuth( $username, $password, ) ) ] ); $projectRequest = new ProjectReq(); $projectRequest ->setProjectName((string)$projectName) ->setPublic(false); $client->createProject($projectRequest);
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-22