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
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.4.5
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- overtrue/phplint: ^9.0
- phpunit/phpunit: ^9.0
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
- Activity
- ActivityTemplate
- ActivityTimes
- AppRole
- AppRoleAssignment
- Application
- Audio
- ClassMemberReference
- ClassReference
- ClassTeacherReference
- CollectionOfActivities
- CollectionOfAppRoleAssignments
- CollectionOfApplications
- CollectionOfClass
- CollectionOfDriveItems
- CollectionOfDriveItems1
- CollectionOfDrives
- CollectionOfDrives1
- CollectionOfEducationClass
- CollectionOfEducationUser
- CollectionOfGroup
- CollectionOfPermissions
- CollectionOfPermissionsWithAllowedValues
- CollectionOfSchools
- CollectionOfTags
- CollectionOfUser
- CollectionOfUsers
- Deleted
- Drive
- DriveItem
- DriveItemCreateLink
- DriveItemInvite
- DriveRecipient
- DriveUpdate
- EducationClass
- EducationSchool
- EducationUser
- EducationUserReference
- ExportPersonalDataRequest
- FileSystemInfo
- Folder
- FolderView
- GeoCoordinates
- Group
- Hashes
- Identity
- IdentitySet
- Image
- ItemReference
- MemberReference
- ObjectIdentity
- OdataError
- OdataErrorDetail
- OdataErrorMain
- OpenGraphFile
- PasswordChange
- PasswordProfile
- Permission
- Photo
- Quota
- RemoteItem
- SharePointIdentitySet
- SharingInvitation
- SharingLink
- SharingLinkPassword
- SharingLinkType
- SignInActivity
- SpecialFolder
- TagAssignment
- TagUnassignment
- Thumbnail
- ThumbnailSet
- Trash
- UnifiedRoleDefinition
- UnifiedRolePermission
- User
- UserUpdate
- Video
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