A Ruby gem to get planning applications data from UK council websites.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
1.3 KiB

  1. module UKPlanningScraper
  2. class Application
  3. attr_accessor :authority_name
  4. attr_accessor :council_reference
  5. attr_accessor :date_received
  6. attr_accessor :date_validated
  7. attr_accessor :status
  8. attr_accessor :scraped_at
  9. attr_accessor :info_url
  10. attr_accessor :address
  11. attr_accessor :description
  12. attr_accessor :documents_count
  13. attr_accessor :documents_url
  14. attr_accessor :alternative_reference
  15. attr_accessor :decision
  16. attr_accessor :date_decision
  17. attr_accessor :appeal_status
  18. attr_accessor :appeal_decision
  19. def to_hash
  20. {
  21. scraped_at: @scraped_at,
  22. authority_name: @authority_name,
  23. council_reference: @council_reference,
  24. date_received: @date_received,
  25. date_validated: @date_validated,
  26. status: @status,
  27. decision: @decision,
  28. date_decision: @date_decision,
  29. info_url: @info_url,
  30. address: @address,
  31. description: @description,
  32. documents_count: @documents_count,
  33. documents_url: @documents_url,
  34. alternative_reference: @alternative_reference,
  35. appeal_status: @appeal_status,
  36. appeal_decision: @appeal_decision
  37. }
  38. end
  39. def valid?
  40. return true if @authority_name && @council_reference && @info_url
  41. false
  42. end
  43. end
  44. end