定制 delaneymethod/sharepoint-api 二次开发

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

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

delaneymethod/sharepoint-api

最新稳定版本:2.0.4

Composer 安装命令:

composer require delaneymethod/sharepoint-api

包简介

A minimal implementation of Sharepoint 2013 REST API

README 文档

README

Latest Version on Packagist Total Downloads

This is a minimal PHP implementation of the Sharepoint 2013 REST API. It contains only the methods needed for our flysystem-sharepoint adapter. We are open however to PRs that add extra methods to the client.

Here are a few examples on how you can use the package:

use DelaneyMethod\Sharepoint\Client as SharepointClient;

$siteName = 'YOUR_TEAM_SITE_NAME';
$siteUrl = 'https://YOUR_SITE.sharepoint.com';
$publicUrl = 'https://YOUR_SITE.sharepoint.com/:i:/r/sites/YOUR_TEAM_SITE_NAME/Shared%20Documents'
$clientId = 'YOUR_CLIENT_ID';
$clientSecret = 'YOUR_CLIENT_SECRET';
$verify = false; // See http://docs.guzzlephp.org/en/stable/request-options.html#verify
$accessToken = 'YOUR_ACCESS_TOKEN';

$client = new SharepointClient($siteName, $siteUrl, $publicUrl, $clientId, $clientSecret, $verify, $accessToken);

// Create a folder
$client->createFolder($path);

// Delete a folder
$client->delete($path);

// Upload a file
$client->upload($path, $contents);

Installation

You can install the package via composer:

composer require delaneymethod/sharepoint-api

Usage

The first thing you need to do is get an authorisation token from Sharepoint. Sharepoint has made this very easy. You can register a new App within your Sharepoint Site that can be used to generate a client ID and Secret. You'll find more info at Authorizing REST API calls against SharePoint Site.

You can read the whole article for additional knowledge but the first step is the only step you're interested in for our flysystem-sharepoint adapter to work.

With an authorization token you can instantiate a DelaneyMethod\Sharepoint\Client.

Look in the source code of DelaneyMethod\Sharepoint\Client to discover the methods you can use.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email hello@delaneymethod.com instead of using the issue tracker.

License

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

统计信息

  • 总下载量: 14.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固