Skip to content

Commit

Permalink
switch to use api_key
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmizerany committed Feb 27, 2024
1 parent 93ef12b commit f0d9501
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Test tap-fleetio
on: [push]

env:
TAP_FLEETIO_API_TOKEN: ${{ secrets.TAP_FLEETIO_API_TOKEN }}
TAP_FLEETIO_API_KEY: ${{ secrets.TAP_FLEETIO_API_KEY }}
TAP_FLEETIO_ACCOUNT_TOKEN: ${{ secrets.TAP_FLEETIO_ACCOUNT_TOKEN }}

jobs:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pipx install git+https://github.com/fleetio/tap-fleetio.git@main

| Setting | Required | Default | Description |
|:--------------------|:--------:|:-------:|:------------|
| api_token | True | None | The token to authenticate against the Fleetio API |
| api_key | True | None | The token to authenticate against the Fleetio API |
| account_token | True | None | Account Token |
| api_url | False | https://secure.fleetio.com/api | Fleetio API base url |
| 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). |
Expand Down
2 changes: 1 addition & 1 deletion meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins:
- about
- stream-maps
settings:
- name: api_token
- name: api_key
kind: password
- name: account_token
kind: password
Expand Down
2 changes: 1 addition & 1 deletion tap_fleetio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def http_headers(self) -> dict:
headers = {}
if "user_agent" in self.config:
headers["User-Agent"] = self.config.get("user_agent")
headers["Authorization"] = f"Token {self.config.get('api_token')}"
headers["Authorization"] = f"Token {self.config.get('api_key')}"
headers["Account-Token"] = self.config.get('account_token')
headers["X-Client-Name"] = "data_connector"
headers["X-Client-Platform"] = "fleetio_singer_tap"
Expand Down
4 changes: 2 additions & 2 deletions tap_fleetio/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class Tapfleetio(Tap):

config_jsonschema = th.PropertiesList(
th.Property(
"api_token",
"api_key",
th.StringType,
required=True,
secret=True, # Flag config as protected.
description="The token to authenticate against the Fleetio API",
description="The key to authenticate against the Fleetio API",
),
th.Property(
"account_token",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from tap_fleetio.tap import Tapfleetio

SAMPLE_CONFIG = {
"api_token": os.environ.get("TAP_FLEETIO_API_TOKEN"),
"api_key": os.environ.get("TAP_FLEETIO_API_KEY"),
"account_token": os.environ.get("TAP_FLEETIO_ACCOUNT_TOKEN")
}

Expand Down

0 comments on commit f0d9501

Please sign in to comment.