owncloud/libre-graph-api-php

Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.

dev-main 2024-08-29 13:58 UTC

This package is auto-updated.

Last update: 2024-10-29 14:19:37 UTC


README

Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/owncloud/libre-graph-api-php.git"
    }
  ],
  "require": {
    "owncloud/libre-graph-api-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/libregraph/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenAPI\Client\Api\ActivitiesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$kql = resourceid:a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668 depth:2; // string

try {
    $result = $apiInstance->getActivities($kql);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActivitiesApi->getActivities: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph

Models

Authorization

openId

bearerAuth

  • Type: Bearer authentication (plain)

basicAuth

  • Type: HTTP basic authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.0.4
  • Build package: org.openapitools.codegen.languages.PhpNextgenClientCodegen