承接 apility/microsoft-graph-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

apility/microsoft-graph-api

最新稳定版本:v1.0.0-RC4

Composer 安装命令:

composer require apility/microsoft-graph-api

包简介

This package provides a PHP client library for working with the Microsoft Graph API.

README 文档

README

This package provides a Laravel wwrappers for working with the Microsoft Graph API.

Table of Contents

Installation

composer require apility/microsoft-graph-api

Laravel

Configuration

Export the configuration file:

php artisan vendor:publish --provider="Microsoft\GraphAPI\ServiceProvider" --tag="config"

Add the following environment variables to your .env file:

MICROSOFT_GRAPH_API_TENANT_ID=<your-tenant-id>
MICROSOFT_GRAPH_API_APP_ID=<your-app-id>
MICROSOFT_GRAPH_API_CLIENT_SECRET=<your-client-secret>

Usage

use Microsoft\GraphAPI\Facades\GraphAPI;

$me = GraphAPI::get('/me')->json();

Filesystem

The package also provides a Flysystem adapter.

To enable this, add the following to your disk configuration in the config/filesystems.php file:

'disks' => [
    'microsoft' => [
        'driver' => 'microsoft',
        'site_id' => env('MICROSOFT_GRAPH_API_SITE_ID'),
    ],
],

You may now use the microsoft disk in your application.

$files = Storage::disk('microsoft')->allFiles('path');

Only read, list and delete operations are currently supported.

Without Laravel (Plain PHP)

Usage

use Microsoft\GraphAPI\GraphAPI\Client;
use Microsoft\GraphAPI\GraphAPI\Auth\Credentials;

$credentials = new Credentials(
    '<your-tenant-id>',
    '<your-app-id>',
    '<your-client-secret>'
);

$client = new Client($credentials);

$me = $client->get('/me');

License

The MIT License (MIT). Please see License File for more information.

Copyright Apility AS © 2023

统计信息

  • 总下载量: 65
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-17