Skip to content

Commit

Permalink
auto-bump connector version
Browse files Browse the repository at this point in the history
  • Loading branch information
octavia-squidington-iii committed Jun 15, 2022
1 parent c86f971 commit fa3d58f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@
- name: Zendesk Support
sourceDefinitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
dockerRepository: airbyte/source-zendesk-support
dockerImageTag: 0.2.9
dockerImageTag: 0.2.10
documentationUrl: https://docs.airbyte.io/integrations/sources/zendesk-support
icon: zendesk.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9678,7 +9678,7 @@
path_in_connector_config:
- "credentials"
- "client_secret"
- dockerImage: "airbyte/source-zendesk-support:0.2.9"
- dockerImage: "airbyte/source-zendesk-support:0.2.10"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/zendesk-support"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class SourceZendeskSupportCursorPaginationStream(SourceZendeskSupportFullRefresh
"""
Endpoints provide a cursor pagination and sorting mechanism
"""

cursor_field = "updated_at"
next_page_field = "next_page"
prev_start_time = None
Expand Down Expand Up @@ -495,11 +496,7 @@ def next_page_token(self, response: requests.Response) -> Optional[Mapping[str,
def request_params(
self, stream_state: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs
) -> MutableMapping[str, Any]:
params = {
"page": 1,
"per_page": self.page_size,
"sort_by": "asc"
}
params = {"page": 1, "per_page": self.page_size, "sort_by": "asc"}
start_time = self.str2unixtime((stream_state or {}).get(self.cursor_field))
params["start_time"] = start_time if start_time else self.str2unixtime(self._start_date)
if next_page_token:
Expand All @@ -517,21 +514,23 @@ class TicketForms(SourceZendeskSupportCursorPaginationStream):

class TicketMetrics(SourceZendeskSupportCursorPaginationStream):
"""TicketMetric stream: https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_metrics/"""

def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]:
next_page = self._parse_next_page_number(response)
return next_page if next_page else None

def request_params(self, stream_state: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs) -> MutableMapping[str, Any]:

def request_params(
self, stream_state: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs
) -> MutableMapping[str, Any]:
params = {
"start_time": self.check_stream_state(stream_state),
"page": 1,
"per_page": self.page_size,
}
if next_page_token:
params['page'] = next_page_token
params["page"] = next_page_token
return params


class TicketMetricEvents(SourceZendeskSupportCursorPaginationStream):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ def test_check_stream_state(self, stream_cls, expected):
(TicketForms, {"start_time": 1622505600}),
(TicketMetricEvents, {"start_time": 1622505600}),
(TicketAudits, {"sort_by": "created_at", "sort_order": "desc", "limit": 1000}),
(SatisfactionRatings, {'page': 1, 'per_page': 100, 'sort_by': 'asc', 'start_time': 1622505600}),
(TicketMetrics, {'page': 1, 'per_page': 100, 'start_time': 1622505600}),
(SatisfactionRatings, {"page": 1, "per_page": 100, "sort_by": "asc", "start_time": 1622505600}),
(TicketMetrics, {"page": 1, "per_page": 100, "start_time": 1622505600}),
],
ids=[
"GroupMemberships",
Expand Down

0 comments on commit fa3d58f

Please sign in to comment.