Class: Immobilienscout::API::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/immobilienscout/api/report.rb

Class Method Summary collapse

Class Method Details

.retrieve(is24_id, date_from, date_to) ⇒ Object

Raises:

  • (ArgumentError)


7
8
9
10
11
12
13
14
# File 'lib/immobilienscout/api/report.rb', line 7

def retrieve(is24_id, date_from, date_to)
  raise ArgumentError unless is24_id.present? && date_from.present? && date_to.present?

  query_params = query_params(date_from, date_to)
  url = retrieve_url(is24_id)

  execute_get_request(url, query_params)
end