dywily / gaw
包装一些 Google API,例如 Gmail API
v1.0.0
2023-03-25 20:08 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-dom: *
- ext-libxml: *
- google/apiclient: ^2.12.1
- nesbot/carbon: ^2.66
This package is auto-updated.
Last update: 2024-09-25 23:14:04 UTC
README
- 来自 google/apiclient 的包基础
- 目前仅包装了 Gmail,您可以轻松管理同步邮件、显示邮件和发送邮件
- 参考包中的 examples 文件夹用于基础知识
- 您可以看到配置文件
config/gaw.php并覆盖相关配置
配置 OAuth 客户端授权
-
您需要将下载的凭据文件移动到配置 {auth_path}/{credential_file}
Examples 文件夹的使用
-
进入 examples 的父目录
-
执行
php -S localhost:8068
如果您使用的是 Laravel
- 将以下内容添加到
routes/console.php
Artisan::command('dywily:gaw-install', function () { $dt = new Dywily\Gaw\Console\InstallCommand(); $dt->handle(); });
- 执行
php artisan dywily:gaw-install
- 将以下内容添加到
config/app.php的providers
App\Providers\GmailServiceProvider::class,
- 执行并查看: https://:8068/getLabels
php artisan serve --port 8068