amoniacou / pipedrive.rb

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

Rails initializer not working #10

Closed danielfmoreira closed 4 years ago

danielfmoreira commented 4 years ago

When i add the rails initializer to skip sending the api token to new entity classes i still get the error:

`api_token should be set``

I'm calling the client like this (with thew initializer configured)

client = Pipedrive::Person.new
person = client.find_by_id(1)
simonoff commented 4 years ago

Hi!

Have you created an initializer?

Pipedrive.setup do |n|
  n.api_token = ENV['PIPEDRIVE_API_TOKEN']
end