(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:
Instantiate PyPardot client by specifying version
p = PardotAPI(email='some@example.com', password='xxxx', user_key='yyyy', version=3)
# defaults to 4
Load different methods:
p.prospects.update_by_email('some@example.com', params) # Only supported with ver. 3
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.
(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:
version
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.