lib/pipe_rocket/service.rb
# Getting all @resource_name object from Pipedrive
Getting all @resource_name object from Pipedrive
Getting all @resource_name object from Pipedrive
def all
      uri = build_uri
      response = HTTP.get(uri)
      case response.code
      when 200
        json_array = ::JSON.parse(response)['data']
        json_array.map{|raw|build_entity(raw)}
      else
        raise PipeRocket::Error.new(response.code)
      end
    rescue HTTP::ConnectionError
      raise PipeRocket::Error.new(408)
    end
def all uri = build_uri response = HTTP . get ( uri ) case response . code when 200 json_array = :: JSON . parse ( response ) [ 'data' ] json_array . map { | raw | build_entity ( raw ) } else raise PipeRocket :: Error . new ( response . code ) end rescue HTTP :: ConnectionError raise PipeRocket :: Error . new ( 408 ) end
Getting all @resource_name object from Pipedrive
Getting all @resource_name object from Pipedrive