wohnparc/moeware-client
最新稳定版本:v1.5.3
Composer 安装命令:
composer require wohnparc/moeware-client
包简介
The PHP client library for the Moeware GraphQL API
README 文档
README
moeware-client-php
This repository holds the official PHP client library for the Moeware GraphQL API.
Getting started
Install
The library is available via packagist.
You can install it by simply running the following command in your project:
composer require wohnparc/moeware-client
During development, this library can be added to your project by directly referencing this repository:
{
...
"repositories": [
{
"type": "vcs",
"url": "https://github.com/wohnparc/moeware-client-php.git"
}
],
"minimum-stability": "dev",
"require": {
...
"wohnparc/moeware-client": "dev-main"
}
}
Usage
A simple example:
$client = new Client("<endpoint>", "<api_key>", "<api_secret>"); $date = new DateTime("now - 1 day"); $result = $client->queryUpdatedArticleAndSetRefs($date); if ($result->hasErrors()) { // handle errors appropriately } $result->getArticleRefs(); $result->getSetRefs();
With Basic Authentication
If your Moeware instance is protected by HTTP Basic Authentication (e.g., via Caddy), you can provide the credentials:
$client = new Client( "<endpoint>", "<api_key>", "<api_secret>", "<basic_auth_username>", "<basic_auth_password>" ); // Use the client as normal $result = $client->queryIsMoeveAvailable();
License
This project is licensed under the terms of the MIT license.
For further details, please take a look at the LICENSE file. A list of all dependencies and its licenses can be found at docs/licenses.md.
Maintainers
统计信息
- 总下载量: 2.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-20