jscott1989 / python-pipedrive

Python API for interacting with the pipedrive.com API
MIT License
93 stars 43 forks source link

No way to test the sandbox environment #16

Closed redhat-raptor closed 5 years ago

redhat-raptor commented 5 years ago

Currently, the API URL is hardcoded in the code hence there is no way to test the API calls in the Sandbox environment.

Something like following would allow better handling the API URL:

def __init__(self, api_url, email, password=None):
    self.api_url = api_url if api_url else 'https://api.pipedrive.com/v1/'
...
uri = self.api_url + endpoint + '?api_token=' + str(self.api_token)
MatheusAmelco commented 5 years ago

It is possible to send requests to a sandbox environment with the URI "https://api.pipedrive.com/v1/". Just enter your token that should work fine.

redhat-raptor commented 5 years ago

Ah... I see.. so, the token already identifies the env? I thought we would explicitly need to make requests to prod or sandbox! Thanks for clarifying!