vacationrentals

package
v0.0.0-...-268a1c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 JobMetadata struct {
	Limit  int
	Offset int
}

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(conn *pgxpool.Pool) *Repo

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 (s *VacationRentalScraper) HandleResponse(j infra.Job, resp *http.Response, httpErr error) (*infra.Job, error)

func (*VacationRentalScraper) MakeRequest

func (s *VacationRentalScraper) MakeRequest(j infra.Job) (*http.Request, error)

type VacationRentalTime

type VacationRentalTime struct {
	time.Time
}

func (*VacationRentalTime) UnmarshalJSON

func (m *VacationRentalTime) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL