Documentation ¶
Index ¶
- Constants
- type JobMetadata
- type Repo
- type VacationRental
- type VacationRentalScraper
- func (s *VacationRentalScraper) Configure(pool *pgxpool.Pool) (err error)
- func (s *VacationRentalScraper) EnqueueJobs() (jobs []infra.Job, err error)
- func (s *VacationRentalScraper) HandleResponse(j infra.Job, resp *http.Response, httpErr error) (*infra.Job, error)
- func (s *VacationRentalScraper) MakeRequest(j infra.Job) (*http.Request, error)
- type VacationRentalTime
Constants ¶
View Source
const ( ScraperName = "VACATION-RENTALS" MergedVacationRentalsURL = "https://data.nola.gov/resource/rbhq-zbz9.json" LimitPerPage = 1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobMetadata ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) StoreRentals ¶
func (r *Repo) StoreRentals(rentals []*VacationRental) error
type VacationRental ¶
type VacationRental struct { Name string `json:"name"` AddressName string `json:"address"` Type string `json:"type"` ExpirationDate VacationRentalTime `json:"expiration_date"` X *float64 `json:",string"` Y *float64 `json:",string"` BedroomLimit *int64 `json:"bedroom_limit,string"` GuestLimit *int64 `json:"guest_limit,string"` LngLatPoint postgis.PointS Location struct { Latitude *float64 `json:",string"` Longitude *float64 `json:",string"` HumanAddress string `json:"human_address"` } `json:"location"` }
func (*VacationRental) AfterParse ¶
func (v *VacationRental) AfterParse()
type VacationRentalScraper ¶
type VacationRentalScraper struct {
// contains filtered or unexported fields
}
func NewScraper ¶
func NewScraper() *VacationRentalScraper
func (*VacationRentalScraper) Configure ¶
func (s *VacationRentalScraper) Configure(pool *pgxpool.Pool) (err error)
func (*VacationRentalScraper) EnqueueJobs ¶
func (s *VacationRentalScraper) EnqueueJobs() (jobs []infra.Job, err error)
func (*VacationRentalScraper) HandleResponse ¶
func (*VacationRentalScraper) MakeRequest ¶
type VacationRentalTime ¶
func (*VacationRentalTime) UnmarshalJSON ¶
func (m *VacationRentalTime) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.