Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

76 multiple base url for avni #77

Merged
merged 1 commit into from
Apr 13, 2024
Merged
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
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-avni/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_avni ./source_avni
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.0
LABEL io.airbyte.version=0.1.1
LABEL io.airbyte.name=airbyte/source-avni
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-avni/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 5d297ac7-355e-4a04-be75-a5e7e175fc4e
dockerImageTag: 0.1.0
dockerImageTag: 0.1.1
dockerRepository: airbyte/source-avni
githubIssueLabel: source-avni
icon: avni.svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@dataclass
class CustomAuthenticator(BasicHttpAuthenticator):


@property
def token(self) -> str:

Expand All @@ -28,9 +27,9 @@ def auth_header(self) -> str:
return "auth-token"

def get_client_id(self):
url_client = "https://app.avniproject.org/idp-details"
response = requests.get(url_client)

url_client = self.config["url_base"] + "/idp-details"
response = requests.get(url_client, timeout=30)
response.raise_for_status()
client = response.json()
return client["cognito"]["clientId"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ definitions:

requester:
type: HttpRequester
url_base: "https://app.avniproject.org/api"
url_base: "{{config['url_base']}}/api"
http_method: "GET"
authenticator:
class_name: source_avni.components.CustomAuthenticator
username: "{{config['username']}}"
password: "{{config['password']}}"
idp_base: "{{config['url_base']}}"

retriever:
type: SimpleRetriever
Expand Down Expand Up @@ -123,6 +124,7 @@ spec:
required:
- username
- password
- url_base
- start_date
additionalProperties: true
properties:
Expand All @@ -135,6 +137,10 @@ spec:
description: Your avni platform password
title: Password
airbyte_secret: true
url_base:
type: string
description: Your avni platform base url, with no trailing slash (/)
title: Base URL (no trailing /)
start_date:
type: string
default: "2000-06-23T01:30:00.000Z"
Expand Down
Loading