Skip to content

Commit

Permalink
Revert to v1.3.1 (#36)
Browse files Browse the repository at this point in the history
* Revert "Call join correctly (#34)"

This reverts commit 76f8b3c.

* Revert "changed parent id parameter to a function for different streams (#32)"

This reverts commit 85fc3ad.

* Revert "copy of pr#15 with merge conflicts resolved  (#29)"

This reverts commit 06828fa.
  • Loading branch information
leslievandemark authored Jun 15, 2021
1 parent 9c12e31 commit b8d6640
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ venv.bak/

catalog.json
config.json
configredshift.json
state.json

tests/__pycache__
File renamed without changes.
16 changes: 2 additions & 14 deletions tap_pardot/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def get_params(self):
return {"offset": self.get_bookmark("offset")}

def get_records(self, parent_ids):
params = {self.parent_id_param: self.format_parent_ids(parent_ids), **self.get_params()}
params = {self.parent_id_param: parent_ids, **self.get_params()}
data = self.client.post(self.endpoint, **params)
self.update_bookmark("offset", params.get("offset", 0) + 200)

Expand All @@ -311,9 +311,6 @@ def get_records(self, parent_ids):

return records

def format_parent_ids(self, parent_ids):
return parent_ids

def sync_page(self, parent_ids):
for rec in self.get_records(parent_ids):
yield rec
Expand Down Expand Up @@ -403,14 +400,6 @@ class Visitors(UpdatedAtReplicationStream):

is_dynamic = False

def get_params(self):
return {
"updated_after": self.get_bookmark(),
"sort_by": "updated_at",
"sort_order": "ascending",
"only_identified": "false",
}


class Visits(ChildStream, NoUpdatedAtSortingStream):
stream_name = "visits"
Expand Down Expand Up @@ -439,8 +428,7 @@ def sync_page(self, parent_ids):
self.fix_page_views(rec)
self.max_updated_at = max(self.max_updated_at, rec["updated_at"])
yield rec
def format_parent_ids(self, parent_ids):
return ",".join(str(parent_id) for parent_id in parent_ids)


class Lists(UpdatedAtReplicationStream):
stream_name = "lists"
Expand Down

0 comments on commit b8d6640

Please sign in to comment.