Skip to content

Commit

Permalink
Black formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
xacadil committed Apr 26, 2024
1 parent f98fe3b commit 6508195
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 57 deletions.
11 changes: 5 additions & 6 deletions tap_restaurant365/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@

class Restaurant365Stream(RESTStream):
"""Restaurant365 stream class."""

skip = 0
days_delta = 10

@property
def url_base(self) -> str:
"""Return the API URL root, configurable via tap settings."""
return "https://odata.restaurant365.net/api/v2/views"

records_jsonpath = "$.value[*]"

records_jsonpath = "$.value[*]"

@property
def authenticator(self) -> BasicAuthenticator:
Expand Down Expand Up @@ -60,9 +61,7 @@ def get_new_paginator(self) -> BaseAPIPaginator:
# else:
# params


return super().get_new_paginator()


def get_starting_time(self, context):
start_date = self.config.get("start_date")
Expand All @@ -88,11 +87,11 @@ def get_url_params(

params: dict = {}
if self.replication_key:
start_date = self.get_starting_time(context).strftime('%Y-%m-%dT%H:%M:%SZ')
start_date = self.get_starting_time(context).strftime("%Y-%m-%dT%H:%M:%SZ")
params["$filter"] = f"{self.replication_key} ge {start_date}"

return params

def validate_response(self, response: requests.Response) -> None:
if (
response.status_code in self.extra_retry_statuses
Expand Down
Loading

0 comments on commit 6508195

Please sign in to comment.