amoniacou / pipedrive.rb

Pipedrive.com API Wrapper
MIT License
33 stars 56 forks source link

Support find_by_name for Organizations #6

Open rmorlok opened 5 years ago

rmorlok commented 5 years ago

Currently, the person class supports find_by_name, but this is also available in the API for organizations. Please add support for that class as well.

rmorlok commented 5 years ago

Ah, sorry, this already exists. It looks like the gem just hasn't been updated. Could we get a new version of the gem?

Thanks!

choosen commented 5 years ago

I think it's resolved

We use finding organisations by term (this means also in other string fields)

rmorlok commented 5 years ago

So term searches beyond just the name? This would be good for some cases, but not if you are specifically searching by name.

Per my second comment, the code actually supports searching by name, a new release of the gem just hasn't been pushed since that change was made. Can you push a new version of the gem?

choosen commented 5 years ago

Yeah, term aims in different fields also.

This is gem which uses public API

there is no other way to query it according to: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/get_organizations_find

rmorlok commented 5 years ago

Ah, I see what you mean. The find_by_name method is actually implemented as a term search, regardless.

Perhaps I'm missing something, but I'm not seeing anything in the ruby code for how to do a term search for an organization. If you could point me to it, I'd appreciate it.

Per my previous messages, there is the following code which is labeled as find_by_name (which does the term search), but it is not part of the current version of the gem, and I was hoping you could release it as a new version.

https://github.com/amoniacou/pipedrive.rb/blob/master/lib/pipedrive/organization.rb#L9

choosen commented 5 years ago

oh true that, it's not released ; /

merged 3 years ago

we use gem 'pipedrive.rb', git: 'https://github.com/amoniacou/pipedrive.rb.git'

9211ali commented 1 year ago

@rmorlok @choosen, Can you share example of find_by_name example for organization. And how to find unique organization using unique attributes i.e. name or other field. kindly guide about it.

when I try by name, client = ::Pipedrive::Organization.new(ENV[‘PIPEDRIVE_API_TOKEN’]) client.find_by_name(‘name’) , it return result like

<Enumerator: #<Pipedrive::Organization:0x00007f06a0ab8210 @api_token=“my_api_token”>:find_by_name(term: name)>

image

choosen commented 1 year ago

sorry , not in the project with pipedrive anymore. Cannot paste it

rmorlok commented 1 year ago

Unfortunately I don't have access to the project using pipedrive as well.