Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate the implementations between ver. 3 and 4 #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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='[email protected]', password='xxxx', user_key='yyyy', version=3)
# defaults to 4
  1. Load different methods:
p.prospects.update_by_email('[email protected]', 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