getonbrd / pipedrive-connect Goto Github PK
View Code? Open in Web Editor NEWRuby library for the Pipedrive API.
License: MIT License
Ruby library for the Pipedrive API.
License: MIT License
I'm testing the API and getting an error
require 'pipedrive'
Pipedrive.api_key = "abc123"
Pipedrive::Organization.retrieve(1)
WARNING: No adapter was configured for this request
Traceback (most recent call last):
1: from (irb):5
TypeError (no implicit conversion of nil into String)
The same goes for other objects and methods. What am I doing wrong?
Ruby: 2.6.5
Thanks
Hello,
It seems you have a malformed request issue on the organization search API:
https://developers.pipedrive.com/docs/api/v1/Organizations#searchOrganization
The doc states that fields should be a comma-separated string array &fields=name,address&
, and your http clients builds the request the following way: &fields[]=name&fields[]address&
This leads to fields being ignored by Pipedrive (I double checked with their Postman client)
Thanks so much for putting this gem together, we've built our whole Pipedrive integration around it.
I have one request: I was debugging a particularly tricky API request and kept receiving the error
<Pipedrive::UnkownAPIError: HTTP request is not valid>
It was only once I did a request directly and I could inspect what I got back did I see:
{"success"=>false, "statusCode"=>10009, "error"=>"HTTP request is not valid", "error_info"=>"Either 'infinite' or 'cyclesCount' must be specified.", "data"=>nil}
Returning this specific error info would be a huge developer experience improvement
Hello,
I've been using this gem for a while, thank you for your amazing work.
I just noticed what it seems that might be a bug. After adding a number of custom fields to my Deals, I noticed that they were not showing up on the automated mapping that is done for those fields.
After digging around, I noticed that when calling Pipedrive::Deals.fields
the new custom fields were not showing up at all. When I enabled debugging, I noticed that the raw call had this at the end:
"additional_data":{"pagination":{"start":0,"limit":100,"more_items_in_collection":true,"next_start":100}}
After digging a bit on the code, I found that the existing request
method is not handling pagination, and that is why my new fields are not showing up for me on the automatic mapping done.
(FYI, a very quick temporary fix would be to just increase the pagination limit from the standard 100 to the max 500, which although would solve cases like mine, would still hit the wall for more than 500 fields.)
Hello,
I am starting to use this gem in a project, and am wondering why my only option to use it is by adding a direct GitHub link on the Gemfile. Even with Gemfile.lock enforcing the revision, I would feel more comfortable with managed versions on something like RubyGems. Is there a particular reason why this gem isn't available there?
Version: 1.2.11
Everything is working w/ my Pipedrive integration mostly except when trying to update a lead we get a 404 Not Found error.
I can find leads, persons, etc no problem. Updating a person works. When attempting any update to a lead though, the response.body in Pipedrive::Util is Not Found (404). Is anyone else running into this issue?
Steps to reproduce:
Pipedrive::Subscription.find_by_deal 123
where 123 is a deal ID of a deal without a subscriptionJSON::ParserError: 859: unexpected token at ''
Example response from Pipedrive API
#<Faraday::Response:0x000000010f4fba40
@env=
#<struct Faraday::Env
method=:get,
request_body=nil,
url=#<URI::HTTPS https://api.pipedrive.com/v1/subscriptions/find/134?api_token=xxx>,
request=
#<struct Faraday::RequestOptions
params_encoder=nil,
proxy=nil,
bind=nil,
timeout=nil,
open_timeout=nil,
read_timeout=nil,
write_timeout=nil,
boundary=nil,
oauth=nil,
context=nil,
on_data=nil>,
request_headers={"Content-type"=>"application/json", "User-Agent"=>"Faraday v1.10.2"},
ssl=
#<struct Faraday::SSLOptions
verify=true,
ca_file=nil,
ca_path=nil,
verify_mode=nil,
cert_store=nil,
client_cert=nil,
client_key=nil,
certificate=nil,
private_key=nil,
verify_depth=nil,
version=nil,
min_version=nil,
max_version=nil>,
parallel_manager=nil,
params=nil,
response=#<Faraday::Response:0x000000010f4fba40 ...>,
response_headers=
{"date"=>"Tue, 18 Oct 2022 19:44:34 GMT",
"connection"=>"keep-alive",
"cf-ray"=>"75c3c4f8c890892a-LHR",
"cache-control"=>"no-cache",
"strict-transport-security"=>"max-age=31536000; includeSubDomains",
"cf-cache-status"=>"DYNAMIC",
"access-control-expose-headers"=>"X-RateLimit-Remaining, X-RateLimit-Limit, X-RateLimit-Reset",
"badi"=>"Routing: lon-1=>lon-1; Version: 6c1f; Host: bari;",
"content-security-policy"=>
"default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests",
"expect-ct"=>"max-age=0",
"referrer-policy"=>"no-referrer",
"x-content-type-options"=>"nosniff",
"x-correlation-id"=>"05170582-eb94-4a54-ae5f-11ae7f0f6e43",
"x-dns-prefetch-control"=>"off",
"x-download-options"=>"noopen",
"x-frame-options"=>"SAMEORIGIN",
"x-permitted-cross-domain-policies"=>"none",
"x-ratelimit-limit"=>"40",
"x-ratelimit-remaining"=>"39",
"x-ratelimit-reset"=>"2",
"x-xss-protection"=>"0, 1; mode=block",
"set-cookie"=>
"__cf_bm=7r3lRUGQaoPJstDSFFHDlU_hyV_PLiJaz3RfrV9qzZg-1666122274-0-ARbMOavaNv/AWNHSfTitqokXEN1TPAuP7SnialIhgOGNJ8JL8XgaTEWxMiL5mh0bvQI8zTpEEC4QYBQqx7WpJvE=; path=/; expires=Tue, 18-Oct-22 20:14:34 GMT; domain=.pipedrive.com; HttpOnly; Secure; SameSite=None",
"vary"=>"Accept-Encoding",
"server"=>"cloudflare",
"alt-svc"=>"h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"},
status=204,
reason_phrase="No Content",
response_body="">,
@on_complete_callbacks=[]>
Hello,
it seems that you have a typo in the readme doc (extact_match instead of exact_match).
I suppose it should be corrected because it bit us hard (our fault, we shouldn't have copy pasted, and tested better).
I would have opened a PR directly but I am not authorized to do so.
Thanks for the gem!
ps: side question: We noticed the issue because using extact_match resulted in having exact_match
set to false, and thus an unexpected organization was returned in our search. But our search was specifying one field (our system id), and the returned item did not match the id at all, but had the searched id as part of its phone number.
I'm puzzled that it was returned since I am searching only on my custom id field, and not on phone number.
Any idea of what could have happened ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.