Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bazarnov committed Apr 4, 2022
1 parent d1d50ed commit 9ebea7b
Showing 1 changed file with 12 additions and 39 deletions.
51 changes: 12 additions & 39 deletions docs/integrations/sources/zendesk-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,6 @@ This Source is capable of syncing the following core Streams:
* [Ticket Metric Events](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_metric_events/)
* [Users](https://developer.zendesk.com/rest_api/docs/support/users)

The streams below are not implemented. Please open a Github issue or request it through Airbyte Cloud's support box if you are interested in them.

**Tickets**

* [Ticket Attachments](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/)
* [Ticket Requests](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-requests/)
* [Ticket Activities](https://developer.zendesk.com/api-reference/ticketing/tickets/activity_stream/)
* [Ticket Skips](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_skips/)

**Help Center**

* [Articles](https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/)
* [Article Attachments](https://developer.zendesk.com/api-reference/help_center/help-center-api/article_attachments/)
* [Article Comments](https://developer.zendesk.com/api-reference/help_center/help-center-api/article_comments/)
* [Categories](https://developer.zendesk.com/api-reference/help_center/help-center-api/categories/)
* [Management Permission Groups](https://developer.zendesk.com/api-reference/help_center/help-center-api/permission_groups/)
* [Translations](https://developer.zendesk.com/api-reference/help_center/help-center-api/translations/)
* [Sections](https://developer.zendesk.com/api-reference/help_center/help-center-api/sections/)
* [Topics](https://developer.zendesk.com/api-reference/help_center/help-center-api/topics)
* [Themes](https://developer.zendesk.com/api-reference/help_center/help-center-api/theming)
* [Posts](https://developer.zendesk.com/api-reference/help_center/help-center-api/posts)
* [Themes](https://developer.zendesk.com/api-reference/help_center/help-center-api/posts)
* [Post Comments](https://developer.zendesk.com/api-reference/help_center/help-center-api/post_comments/)

### Data type mapping

| Integration Type | Airbyte Type |
Expand All @@ -78,30 +54,27 @@ The connector is restricted by normal Zendesk [requests limitation](https://deve
The Zendesk connector should not run into Zendesk API limitations under normal usage. Please [create an issue](https://github.com/airbytehq/airbyte/issues) if you see any rate limit issues that are not automatically retried successfully.

## Getting started
1. Click `Authenticate your Zendesk account`
2. Enter a `Start Date` as the minimum date of your data replication.
3. Enter your `Subdomain`. Learn how to find it in the `Requirements` section.
4. Click on `Setup Source`.
5. You're now ready to sync your data.

### Requirements

* Zendesk Subdomain
* Auth Method
* API Token
* Zendesk API Token
* Zendesk Email
* OAuth2.0 (obtain access_token by authorising your Zendesk Account)

### Setup guide

* API Token
Generate a API access token using the [Zendesk support](https://support.zendesk.com/hc/en-us/articles/226022787-Generating-a-new-API-token)

We recommend creating a restricted, read-only key specifically for Airbyte access. This will allow you to control which resources Airbyte should be able to access.
* `Subdomain` - this is your Zendesk subdomain that can be found in your account URL. For example, in `https://{MY_SUBDOMAIN}.zendesk.com/`, where `MY_SUBDOMAIN` is the value of your subdomain.
* `Authentication` - Zendesk service provides two authentication methods. Choose between: `OAuth2.0` or `API token`.
* Authentication using `OAuth2.0` (Only for Airbyte Cloud) - obtain `access_token` by authorising using your Zendesk Account credentials. Simply proceed by pressing "Authenticate your Zendesk Account" and complete the authentication.
* Authentication using `API Token`:
* `API Token` - the value of the API token generated. See the [generating API Token](https://support.zendesk.com/hc/en-us/articles/226022787-Generating-a-new-API-token) for more information.
* `Email` - the user email for your Zendesk account.

* OAuth2.0 (Only for Airbyte Cloud)
Simply proceed by pressing "Authenticate your Account" and complete the authentication with your Zendesk credentials.

### CHANGELOG

| Version | Date | Pull Request | Subject |
|:---------|:-----------| :----- |:-------------------------------------------------------|
| `0.2.4` | 2022-04-04 | [11688](https://github.com/airbytehq/airbyte/pull/11688) | Small documentation corrections
| `0.2.3` | 2022-03-23 | [11349](https://github.com/airbytehq/airbyte/pull/11349) | Fixed the bug when Tickets stream didn't return deleted records
| `0.2.2` | 2022-03-17 | [11237](https://github.com/airbytehq/airbyte/pull/11237) | Fixed the bug when TicketComments stream didn't return all records
| `0.2.1` | 2022-03-15 | [11162](https://github.com/airbytehq/airbyte/pull/11162) | Added support of OAuth2.0 authentication method
Expand Down

1 comment on commit 9ebea7b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Zendesk Support(#11688)

Measures

Name Value Name Value Name Value
Bugs 0 Lines to Cover 337 Quality Gate Status OK
Reliability Rating A Coverage 75.7 Code Smells 54
Lines of Code 438 Vulnerabilities 0 Duplicated Blocks 0
Duplicated Lines (%) 0.0 Security Rating A Blocker Issues 0
Critical Issues 0 Major Issues 16 Minor Issues 38

Detected Issues

Rule File Description Message
python:black_need_format (MINOR) source_zendesk_support/streams.py Please run one of the commands: "black --config ./pyproject.toml <path_to_updated_folder>" or "./gradlew format" 2 code part(s) should be updated.
python:mypy_arg_type (MINOR) source_zendesk_support/streams.py:343 Check argument types in calls Argument 1 to "int" has incompatible type "Optional[str]"; expected "Union[str, bytes, SupportsInt, SupportsIndex, SupportsTrunc]" . Code line: return {self.cursor_field: int(start_time)}
flake8:W293 (MAJOR) source_zendesk_support/streams.py:380 blank line contains whitespace blank line contains whitespace
flake8:W291 (MAJOR) source_zendesk_support/streams.py:382 trailing whitespace trailing whitespace
python:S5890 (MAJOR) source_zendesk_support/streams.py:423 Values assigned to variables should match their type annotations Assign to "list_entities_from_event" a value of type "list[str]" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_zendesk_support/streams.py:423 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "List[str]") . Code line: list_entities_from_event: List[str] = None
python:S5890 (MAJOR) source_zendesk_support/streams.py:424 Values assigned to variables should match their type annotations Assign to "event_type" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_zendesk_support/streams.py:424 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: event_type: str = None
flake8:W293 (MAJOR) source_zendesk_support/streams.py:430 blank line contains whitespace blank line contains whitespace
python:mypy_override (MINOR) source_zendesk_support/streams.py:431 Check that method override is compatible with base class Signature of "parse_response" incompatible with supertype "BaseSourceZendeskSupportStream" . Code line: def parse_response(self, response: requests.Response, **kwargs) ->...
python:mypy_return_value (MINOR) source_zendesk_support/streams.py:122 Check that return value is compatible with signature Incompatible return value type (got "Optional[str]", expected "Optional[int]") . Code line: return dict(parse_qsl(urlparse(next_page).query)).get("page") ...
python:mypy_override (MINOR) source_zendesk_support/streams.py:345 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "SourceZendeskSupportFullRefreshStream" . Code line: def request_params(
python:mypy_attr_defined (MINOR) source_zendesk_support/streams.py:351 Check that attribute exists Module has no attribute "parse" . Code line: parsed_state = calendar.timegm(pendulum.parse(stream_state...
python:mypy_attr_defined (MINOR) source_zendesk_support/streams.py:354 Check that attribute exists Module has no attribute "parse" . Code line: parsed_state = calendar.timegm(pendulum.parse(self.start...
flake8:W293 (MAJOR) source_zendesk_support/streams.py:370 blank line contains whitespace blank line contains whitespace
python:mypy_assignment (MINOR) source_zendesk_support/streams.py:373 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: sideload_param: str = None
python:S5890 (MAJOR) source_zendesk_support/streams.py:373 Values assigned to variables should match their type annotations Assign to "sideload_param" a value of type "str" instead of "NoneType" or update its type hint.
flake8:W293 (MAJOR) source_zendesk_support/streams.py:374 blank line contains whitespace blank line contains whitespace
flake8:W293 (MAJOR) source_zendesk_support/streams.py:385 blank line contains whitespace blank line contains whitespace
flake8:W293 (MAJOR) source_zendesk_support/streams.py:388 blank line contains whitespace blank line contains whitespace
flake8:W293 (MAJOR) source_zendesk_support/streams.py:395 blank line contains whitespace blank line contains whitespace
python:mypy_override (MINOR) source_zendesk_support/streams.py:396 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "SourceZendeskSupportFullRefreshStream" . Code line: def request_params(
flake8:W293 (MAJOR) source_zendesk_support/streams.py:405 blank line contains whitespace blank line contains whitespace
python:mypy_override (MINOR) source_zendesk_support/streams.py:406 Check that method override is compatible with base class Signature of "parse_response" incompatible with supertype "BaseSourceZendeskSupportStream" . Code line: def parse_response(self, response: requests.Response, **kwargs) ->...
python:S1066 (MAJOR) source_zendesk_support/source.py:58 Collapsible "if" statements should be merged Merge this if statement with the enclosing one.
python:mypy_no_any_return (MINOR) source_zendesk_support/source.py:64 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "BasicApiTokenAuthenticator" . Code line: return TokenAuthenticator(token=config["credentials"][...
python:mypy_arg_type (MINOR) source_zendesk_support/source.py:81 Check argument types in calls Argument "start_date" to "UserSettingsStream" has incompatible type "None"; expected "str" . Code line: ...nfig["subdomain"], authenticator=auth, start_date=None).get_settings()
python:mypy_import (MINOR) source_zendesk_support/streams.py:25 Require that imported module can be found or has stubs Library stubs not installed for "requests.auth" (or incompatible with Python 3.7) . Code line: from requests.auth import AuthBase
python:mypy_no_any_return (MINOR) source_zendesk_support/streams.py:62 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Future[Any]" . Code line: return self.executor.submit(func, request, **kwargs)
python:S5890 (MAJOR) source_zendesk_support/streams.py:146 Values assigned to variables should match their type annotations Assign to "response_list_name" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_zendesk_support/streams.py:146 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: response_list_name: str = None
python:mypy_assignment (MINOR) source_zendesk_support/streams.py:147 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "deque[Any]") . Code line: future_requests: deque = None
python:mypy_assignment (MINOR) source_zendesk_support/streams.py:185 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Optional[Any]", variable has type "str") . Code line: start_date = stream_state.get(self.cursor_field)
python:mypy_attr_defined (MINOR) source_zendesk_support/streams.py:244 Check that attribute exists Module has no attribute "parse" . Code line: ... start_time = current_state or calendar.timegm(pendulum.parse(self._...
python:mypy_arg_type (MINOR) source_zendesk_support/streams.py:287 Check argument types in calls Argument "stream_state" to "parse_response" of "BaseSourceZendeskSupportStream" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: ... from self.parse_response(response, stream_state=stream_state, stream_...
python:mypy_assignment (MINOR) source_zendesk_support/streams.py:298 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: response_list_name: str = None
python:S5890 (MAJOR) source_zendesk_support/streams.py:298 Values assigned to variables should match their type annotations Assign to "response_list_name" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_return (MINOR) source_zendesk_support/streams.py:339 Check that function always returns a value Missing return statement . Code line: def next_page_token(self, response: requests.Response) -> Optional...
python:mypy_attr_defined (MINOR) source_zendesk_support/streams.py:358 Check that attribute exists Module has no attribute "parse" . Code line: ... params = {"start_time": calendar.timegm(pendulum.parse(self._...
python:mypy_override (MINOR) source_zendesk_support/streams.py:584 Check that method override is compatible with base class Signature of "parse_response" incompatible with supertype "BaseSourceZendeskSupportStream" . Code line: def parse_response(self, response: requests.Response, **kwargs) ->...
python:mypy_no_any_return (MINOR) source_zendesk_support/streams.py:592 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Mapping[str, Any]" . Code line: return resp
python:mypy_override (MINOR) source_zendesk_support/streams.py:534 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "SourceZendeskSupportCursorPaginationStream" . Code line: def request_params(self, next_page_token: Mapping[str, Any] = None...
python:mypy_no_any_return (MINOR) source_zendesk_support/streams.py:542 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Optional[Mapping[str, Any]]" . Code line: return response.json().get("before_cursor")
python:mypy_arg_type (MINOR) source_zendesk_support/streams.py:484 Check argument types in calls Argument 1 to "str2unixtime" of "BaseSourceZendeskSupportStream" has incompatible type "Optional[Any]"; expected "str" . Code line: start_time = self.str2unixtime((stream_state or {}).get(self.c...
python:mypy_no_any_return (MINOR) source_zendesk_support/streams.py:89 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Union[int, float]" . Code line: return super().backoff_time(response)
python:mypy_import (MINOR) source_zendesk_support/source.py:8 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.7) . Code line: import requests
python:mypy_return (MINOR) source_zendesk_support/source.py:53 Check that function always returns a value Missing return statement . Code line: def get_authenticator(cls, config: Mapping[str, Any]) -> BasicApiT...
python:mypy_valid_type (MINOR) source_zendesk_support/source.py:70 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: def check_connection(self, logger, config) -> Tuple[bool, any]:
python:mypy_import (MINOR) source_zendesk_support/streams.py:18 Require that imported module can be found or has stubs Library stubs not installed for "pytz" (or incompatible with Python 3.7) . Code line: import pytz
python:mypy_import (MINOR) source_zendesk_support/streams.py:19 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.7) . Code line: import requests
python:S5886 (MAJOR) source_zendesk_support/streams.py:97 Function return types should be consistent with their type hint Return a value of type "datetime" instead of "NoneType" or update function "str2datetime" type hint.
python:mypy_return_value (MINOR) source_zendesk_support/streams.py:97 Check that return value is compatible with signature Incompatible return value type (got "None", expected "datetime") . Code line: return None
python:mypy_return_value (MINOR) source_zendesk_support/streams.py:312 Check that return value is compatible with signature Incompatible return value type (got "int", expected "Optional[Mapping[str, Any]]") . Code line: return next_page
python:mypy_no_any_return (MINOR) source_zendesk_support/streams.py:322 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "MutableMapping[str, Any]" . Code line: return params

Coverage (75.7%)

File Coverage File Coverage
source_zendesk_support/init.py 100.0 source_zendesk_support/source.py 44.4
source_zendesk_support/streams.py 80.3

Please sign in to comment.