dywily / gaw
wrap some google api,like 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-05-25 22:33:56 UTC
README
- A package base from google/apiclient
- Currently only packaging the gmail, you can easily manage syncing email, displaying email, and sending email
- The examples folder in the reference package is used for the basics
- you can see configuration file
config/gaw.php
and overwrite related configuration
Configure OAuth client authorization
-
refer: google api 授权及使用 总结
-
You need to move the downloaded credentials file into the configuration {auth_path}/{credential_file}
Usage of Examples folder
-
Enter parent directory of the examples
-
Execute
php -S localhost:8068
- Browser view: http://localhost:8068/examples/index.php
If you use the laravel
- Add the following into
routes/console.php
Artisan::command('dywily:gaw-install', function () { $dt = new Dywily\Gaw\Console\InstallCommand(); $dt->handle(); });
- Execute
php artisan dywily:gaw-install
- Add the following into
providers
ofconfig/app.php
App\Providers\GmailServiceProvider::class,
- Execute and view: http://localhost:8068/getLabels
php artisan serve --port 8068