From 20f451192f1438b5722ea9a915ed2688ebe70d15 Mon Sep 17 00:00:00 2001 From: yuji suzuki <124127211+yjszk@users.noreply.github.com> Date: Wed, 22 May 2024 21:35:16 +0900 Subject: [PATCH] add gmail_api example to README.md (#518) --- docs/source/example.ini | 9 ++++++++- docs/source/usage.md | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/source/example.ini b/docs/source/example.ini index efa56b3b..faeb5f37 100644 --- a/docs/source/example.ini +++ b/docs/source/example.ini @@ -21,4 +21,11 @@ index = email [s3] bucket = my-bucket -path = parsedmarc \ No newline at end of file +path = parsedmarc + +[gmail_api] +credentials_file = /etc/example/credentials.json +token_file = /etc/example/token.json +include_spam_trash = True +paginate_messages = True +scopes = https://www.googleapis.com/auth/gmail.modify diff --git a/docs/source/usage.md b/docs/source/usage.md index bc142a16..5cfafddc 100644 --- a/docs/source/usage.md +++ b/docs/source/usage.md @@ -317,6 +317,10 @@ The full set of configuration options are: credentials, None to disable (Default: `None`) - `token_file` - str: Path to save the token file (Default: `.token`) + + :::{note} + credentials_file and token_file can be got with [quickstart](https://developers.google.com/gmail/api/quickstart/python).Please change the scope to `https://www.googleapis.com/auth/gmail.modify`. + ::: - `include_spam_trash` - bool: Include messages in Spam and Trash when searching reports (Default: `False`) - `scopes` - str: Comma separated list of scopes to use when