wohnparc/moeware-client

The PHP client library for the Moeware GraphQL API


README

library version php version license

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();

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