Skip to content

Conversation

@daigotanaka
Copy link

(redo pr: the previous #42 was opened with my master branch.)

As some people reported in #38, Pardot API resources of ver 3 and 4 have different interfaces while the authentications and the URL format are the same. So, I suggest separating the implementations in the design just as in this pr.

With this design, we will be able to:

  1. Instantiate PyPardot client by specifying version
p = PardotAPI(email='some@example.com', password='xxxx', user_key='yyyy', version=3)
# defaults to 4
  1. Load different methods:
p.prospects.update_by_email('some@example.com', params)   # Only supported with ver. 3
  1. Update the implementation of one version without a fear of breaking another.

I hope you can take a look and consider it.

Most files added in this PR are straight import from Josh Geller's original implementation under object_v3 folder.
The modifications are for allowing a run-time switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant