Skip to content

Commit

Permalink
refactor(templates): Moved class-level attributes to the top in REST …
Browse files Browse the repository at this point in the history
…tap template (#2528)
  • Loading branch information
edgarrmondragon authored Jul 10, 2024
1 parent 8a30fd9 commit 6256fe5
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,18 @@
class {{ cookiecutter.source_name }}Stream({{ cookiecutter.stream_type }}Stream):
"""{{ cookiecutter.source_name }} stream class."""

# Update this value if necessary or override `parse_response`.
records_jsonpath = "$[*]"

# Update this value if necessary or override `get_new_paginator`.
next_page_token_jsonpath = "$.next_page" # noqa: S105

@property
def url_base(self) -> str:
"""Return the API URL root, configurable via tap settings."""
# TODO: hardcode a value here, or retrieve it from self.config
return "https://api.mysample.com"

records_jsonpath = "$[*]" # Or override `parse_response`.

# Set this value or override `get_new_paginator`.
next_page_token_jsonpath = "$.next_page" # noqa: S105

{%- if cookiecutter.auth_method in ("OAuth2", "JWT") %}

@cached_property
Expand Down

0 comments on commit 6256fe5

Please sign in to comment.