From 3b35662fa06abc0311f0bd6d9eb58b0c6d4505ce Mon Sep 17 00:00:00 2001 From: subodh Date: Fri, 9 Jul 2021 14:22:41 +0530 Subject: [PATCH] format zendesk sunshine connector --- .../integration_tests/configured_catalog.json | 30 ++++--------------- .../source_zendesk_sunshine/source.py | 9 +----- .../source_zendesk_sunshine/spec.json | 2 +- .../source_zendesk_sunshine/streams.py | 2 ++ 4 files changed, 10 insertions(+), 33 deletions(-) diff --git a/airbyte-integrations/connectors/source-zendesk-sunshine/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-zendesk-sunshine/integration_tests/configured_catalog.json index 9f3045cca3f4..9fad619ba55f 100644 --- a/airbyte-integrations/connectors/source-zendesk-sunshine/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-zendesk-sunshine/integration_tests/configured_catalog.json @@ -34,10 +34,7 @@ } } }, - "supported_sync_modes": [ - "full_refresh", - "incremental" - ], + "supported_sync_modes": ["full_refresh", "incremental"], "source_defined_cursor": true, "default_cursor_field": [] }, @@ -71,10 +68,7 @@ } } }, - "supported_sync_modes": [ - "full_refresh", - "incremental" - ], + "supported_sync_modes": ["full_refresh", "incremental"], "source_defined_cursor": true, "default_cursor_field": ["updated_at"] }, @@ -105,10 +99,7 @@ } } }, - "supported_sync_modes": [ - "full_refresh", - "incremental" - ], + "supported_sync_modes": ["full_refresh", "incremental"], "source_defined_cursor": true, "default_cursor_field": [] }, @@ -139,10 +130,7 @@ } } }, - "supported_sync_modes": [ - "full_refresh", - "incremental" - ], + "supported_sync_modes": ["full_refresh", "incremental"], "source_defined_cursor": true, "default_cursor_field": [] }, @@ -217,10 +205,7 @@ } } }, - "supported_sync_modes": [ - "full_refresh", - "incremental" - ], + "supported_sync_modes": ["full_refresh", "incremental"], "source_defined_cursor": true, "default_cursor_field": [] }, @@ -245,10 +230,7 @@ } } }, - "supported_sync_modes": [ - "full_refresh", - "incremental" - ], + "supported_sync_modes": ["full_refresh", "incremental"], "source_defined_cursor": true, "default_cursor_field": [] }, diff --git a/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/source.py b/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/source.py index 8e74755164ff..050185ea40c4 100644 --- a/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/source.py +++ b/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/source.py @@ -33,14 +33,7 @@ from airbyte_cdk.sources.streams import Stream from airbyte_cdk.sources.streams.http.auth import TokenAuthenticator -from .streams import ( - Limits, - ObjectRecords, - ObjectTypePolicies, - ObjectTypes, - RelationshipRecords, - RelationshipTypes, -) +from .streams import Limits, ObjectRecords, ObjectTypePolicies, ObjectTypes, RelationshipRecords, RelationshipTypes class Base64HttpAuthenticator(TokenAuthenticator): diff --git a/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/spec.json b/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/spec.json index 9adb9b65dc05..c61498b1fc0f 100644 --- a/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/spec.json +++ b/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/spec.json @@ -4,7 +4,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Zendesk Sunshine Spec", "type": "object", - "required": ["api_token", "email", "start_date" ,"subdomain"], + "required": ["api_token", "email", "start_date", "subdomain"], "additionalProperties": false, "properties": { "api_token": { diff --git a/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/streams.py b/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/streams.py index 8e077d386351..9b3760faee99 100644 --- a/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/streams.py +++ b/airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/streams.py @@ -108,6 +108,7 @@ class ObjectRecords(IncrementalSunshineStream): To support Incremental for this stream I had to use `query` endpoint instead of `objects/records` - this allows me to use date filters. This is the only way to have incremental support. """ + http_method = "POST" def request_body_json( @@ -213,6 +214,7 @@ class Jobs(SunshineStream): This stream is dynamic. The data can exist today, but may be absent tomorrow. Since we need to have some data in the stream this stream is disabled. """ + def path(self, **kwargs) -> str: return "jobs"