Hight level integration with Pipedrive.
Organization (Search / Create / Detail)
from pipedrive import PipeDrive
pd = PipeDrive()
pd.organization.search('xpto')
pd.organization.detail(1)
pd.organization.create({
'name': 'organization name',
'new field': 'this field will be auto created'
})
# Search - The api search api order the results based in request IP address.
$ curl http://localhost/api/organizations?search=br%20luis%2001
{"success": true, "data": [{"id": 65, ...}]}
# Detail
$ curl http://localhost/api/organizations/70
{
"success": true,
"data": {
"data": {"id": 70 ...},
"fields": [{"key": "id", "name": "ID: "}]
}
}
# Create
curl --header "Content-Type: application/json" \
--request POST \
--data '{"data": {"name": "My Fake Company", "new field": "xyz"}}' \
http://localhost/api/organizations
{
"success": true,
"data": {
"id": 98, "name": "My Fake Company", ...
}
}
To integrate with PipeDrive the backend app needs the token configuration, you just need to update app/.env
with the backend key
Make sure that you have Docker and Docker Compose installed in you env.
Checking docker version:
$ docker --version
Docker version 18.03.1-ce, build 9ee9f40
$ docker-compose --version
docker-compose version 1.21.1, build 5a3f1a3
Once you have docker installed run the commands bellow:
$ make build && make up
Now the app should be running in your http://localhost
The backend is a simple python env you just need to install the requirements and run the web api:
$ cd app
$ cp .env.template .env
# Add your PipeDrive api token
$ vi .env
$ pip install -r requirements.txt
$ python wsgi.py
Bottle v0.12.13 server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:8080/
Hit Ctrl-C to quit.
Now the rest api should be running at http://localhost:8080/
Make sure that you have yarn installed, and run the commands bellow.
$ yarn install
$ yarn run build
$ yarn run start:dev
The frontend app should be running at http://localhost:8081/dist/build/search/