本项目实现了与谷歌工作区的交互功能,可用于管理谷歌账户、处理邮件和日历等操作,为开发者提供便捷的服务器端解决方案。
本项目提供了与谷歌工作区交互的功能,以下是快速启动项目的步骤。
通过运行以下命令安装项目依赖:
npm install
运行以下命令以启动服务器:
npm start
可选参数:
--gauth-file
:指定OAuth2凭证文件路径(默认为./.gauth.json)--accounts-file
:指定账户配置文件路径(默认为./.accounts.json)--credentials-dir
:指定存储OAuth凭证的目录(默认为当前目录)示例:
npm start -- --gauth-file ./config/gauth.json --accounts-file ./config/accounts.json
gmail_list_accounts
或 calendar_list_accounts
gmail_query_emails
gmail_get_email
gmail_bulk_get_emails
gmail_create_draft
gmail_delete_draft
gmail_reply
gmail_get_attachment
gmail_bulk_save_attachments
gmail_archive
或 gmail_bulk_archive
calendar_list
calendar_get_events
calendar_create_event
calendar_delete_event
src/
├── main.ts # 主程序入口
├── config/ # 配置文件夹
│ ├── gauth.json
│ └── accounts.json
└── utils/ # 工具函数
├── gmail-service.ts
└── calendar-service.ts
# 启动开发服务器
npm run dev
# 构建项目
npm run build
# 运行测试
npm test
本项目使用MIT许可证,具体请参见LICENSE文件。