fungio/outlook-calendar-bundle
Composer 安装命令:
composer require fungio/outlook-calendar-bundle
包简介
Provides a outlook calendar integration for your Symfony 3 Project.
关键字:
README 文档
README
This bundle use Outlook API for list events in Outlook Calendar.
Please feel free to contribute, to fork, to send merge request and to create ticket.
Requirement
Create an API account
Go to the application registration portal : https://apps.dev.microsoft.com
Click on "Add an app" and put a name to your app.
Click on "Generate New Password" and copy the password
Installation
Step 1: Install OutlookCalendarBundle
Run
composer require fungio/outlook-calendar-bundle:dev-master
Step 2: Enable the bundle
<?php // app/AppKernel.php public function registerBundles() { $bundles = [ // ... new Fungio\OutlookCalendarBundle\FungioOutlookCalendarBundle() ]; }
Step 3: Configuration
# app/config/parameters.yml fungio_outlook_calendar: outlook_calendar: client_id: "YOUR_APPLICATION_ID" client_secret: "THE_PASSWORD_YOU_SAVED"
Example
<?php // in a controller $request = $this->get('request_stack')->getMasterRequest(); $session = new Session(); $outlookCalendar = $this->get('fungio.outlook_calendar'); if ($session->has('fungio_outlook_calendar_access_token')) { // do nothing } else if ($request->query->has('code') && $request->get('code')) { $token = $outlookCalendar->getTokenFromAuthCode($request->get('code'), $redirectUri); $access_token = $token['access_token']; $session->set('fungio_outlook_calendar_access_token', $access_token); } else { return new RedirectResponse($outlookCalendar->getLoginUrl($redirectUri)); } $events = $outlookCalendar->getEventsForDate($session->get('fungio_outlook_calendar_access_token'), new \DateTime('now');
统计信息
- 总下载量: 3.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-10