定制 wearearchitect/sharepoint-oauth-app-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

wearearchitect/sharepoint-oauth-app-client

最新稳定版本:v0.9.101

Composer 安装命令:

composer require wearearchitect/sharepoint-oauth-app-client

包简介

SharePoint OAuth App Client

README 文档

README

The SharePoint OAuth App Client is a PHP library that makes it easy to authenticate via OAuth2 with the SharePoint Online (2013) REST API and work with Lists, Folders, Items, Files and Users.

This library aims for PSR-1, PSR-2 and PSR-4 standards compliance.

Requirements

Installation

composer require "wearearchitect/sharepoint-oauth-app-client:0.9.*"

Basic usage example

<?php

require 'vendor/autoload.php';

use WeAreArchitect\SharePoint\SPException;
use WeAreArchitect\SharePoint\SPList;
use WeAreArchitect\SharePoint\SPSite;

try {
    $settings = [
        'site' => [
            'resource'  => '00000000-0000-ffff-0000-000000000000/example.sharepoint.com@09g7c3b0-f0d4-416d-39a7-09671ab91f64',
            'client_id' => '52848cad-bc13-4d69-a371-30deff17bb4d/example.com@09g7c3b0-f0d4-416d-39a7-09671ab91f64',
            'secret'    => 'YzcZQ7N4lTeK5COin/nmNRG5kkL35gAW1scrum5mXVgE=',
        ]
    ];

    // create a SharePoint Site instance
    $site = SPSite::create('https://example.sharepoint.com/sites/mySite/', $settings);

    // generate an Access Token (App-only Policy)
    $site->createSPAccessToken();

    // get all the Lists and respective Items 
    $lists = SPList::getAll($site, [
        'fetch' => true,
    ]);

    // iterate through each List
    foreach ($lists as $list) {
        var_dump($list);

        // iterate through each List Item
        foreach ($list as $item) {
            var_dump($item);
        }
    }

} catch (SPException $e) {
    // handle exceptions
}

Class documentation

SharePoint credentials

See how to generate the SharePoint credentials here.

Troubleshooting

Check for common library issues and how to solve them

SharePoint Documentation

License

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

统计信息

  • 总下载量: 6.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 15
  • Watchers: 17
  • Forks: 25
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固