Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
# tap-gmail
# `tap-gmail`

`tap-gmail` is a Singer tap for Gmail.
Gmail tap class.

Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.
Built with the [Meltano SDK](https://sdk.meltano.com) for Singer Taps and Targets.

## Installation
## Capabilities

- [ ] `Developer TODO:` Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
* `catalog`
* `state`
* `discover`
* `about`
* `stream-maps`
* `schema-flattening`

```bash
pipx install tap-gmail
```
## Settings

## Configuration
| Setting | Required | Default | Description |
|:-------------------------------|:--------:|:-------:|:------------|
| oauth_credentials.client_id | False | None | Your google client_id |
| oauth_credentials.client_secret| False | None | Your google client_secret |
| oauth_credentials.refresh_token| False | None | Your google refresh token |
| user_id | False | me | The user's email address. The special value me can be used to indicate the authenticated user. More info [here](https://developers.google.com/gmail/api/reference/rest/v1/users/getProfile#path-parameters) |
| messages.include_spam_trash | False | 0 | Include messages from SPAM and TRASH in the results. |
| stream_maps | False | None | Config object for stream maps capability. For more information check out [Stream Maps](https://sdk.meltano.com/en/latest/stream_maps.html). |
| stream_map_config | False | None | User-defined config values to be used within map expressions. |
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
| flattening_max_depth | False | None | The max depth to flatten schemas. |

A full list of supported settings and capabilities is available by running: `tap-gmail --about`

### Accepted Config Options

- [ ] `Developer TODO:` Provide a list of config options accepted by the tap.
## Installation

A full list of supported settings and capabilities for this
tap is available by running:
- [ ] `Developer TODO:` Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.

```bash
tap-gmail --about
poetry install
poetry run tap-gmail
```

## Configuration

### Configure using environment variables

This Singer tap will automatically import any environment variables within the working directory's
Expand All @@ -33,7 +49,8 @@ environment variable is set either in the terminal context or in the `.env` file

### Source Authentication and Authorization

- [ ] `Developer TODO:` If your tap requires special access on the source system, or any special authentication requirements, provide those here.
Look at the ./generate_refresh_token.py file to generate a refresh token


## Usage

Expand Down
2 changes: 1 addition & 1 deletion generate_refresh_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
SCOPE = "https://www.googleapis.com/auth/gmail.readonly"
# The redirect URI set for the given Client ID. The redirect URI for Client ID
# generated for an installed application will always have this value.
_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"
_REDIRECT_URI = "http://localhost"

parser = argparse.ArgumentParser(
description="Generates a refresh token with " "the provided credentials."
Expand Down
Loading