shorttermrentals

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              = "SHORT-TERM-RENTALS"
	MergedVacationRentalsURL = "https://data.nola.gov/resource/en36-xvxg.json"
	LimitPerPage             = 1000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JobMetadata

type JobMetadata struct {
	Limit  int
	Offset int
}

type Permit

type Permit struct {
	Address            string   `json:"address"`
	LicenseNumber      string   `json:"license_number"`
	LicenseType        string   `json:"license_type"`
	ResidentialSubtype string   `json:"residential_subtype"`
	CurrentStatus      string   `json:"current_status"`
	Expired            string   `json:"expired"`
	Link               string   `json:"link"`
	ReferenceCode      string   `json:"reference_code"`
	X                  *float64 `json:",string"`
	Y                  *float64 `json:",string"`
	LngLatPoint        postgis.PointS
	ContactName        string `json:"contact_name"`
	ContactPhone       string `json:"contact_phone"`
	ContactEmail       string `json:"contact_email"`
	LicenseHolderName  string `json:"license_holder_name"`

	ApplicationDate      PermitTime `json:"application_date"`
	ExpirationDate       PermitTime `json:"expiration_date"`
	IssueDate            PermitTime `json:"issue_date"`
	OperatorPermitNumber string     `json:"operator_permit_number"`

	BedroomLimit        *int64 `json:"bedroom_limit,string"`
	GuestOccupancyLimit *int64 `json:"guest_occupancy_limit,string"`

	Location struct {
		Latitude  *float64 `json:",string"`
		Longitude *float64 `json:",string"`
	} `json:"location"`
}

func (*Permit) AfterParse

func (p *Permit) AfterParse()

type PermitTime

type PermitTime struct {
	time.Time
}

func (*PermitTime) UnmarshalJSON

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

type Repo

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

func NewRepo

func NewRepo(conn *pgxpool.Pool) *Repo

func (*Repo) StorePermits

func (r *Repo) StorePermits(permits []*Permit) error

type STRScraper

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

func NewScraper

func NewScraper() *STRScraper

func (*STRScraper) Configure

func (s *STRScraper) Configure(pool *pgxpool.Pool) (err error)

func (*STRScraper) EnqueueJobs

func (s *STRScraper) EnqueueJobs() (jobs []infra.Job, err error)

func (*STRScraper) HandleResponse

func (s *STRScraper) HandleResponse(j infra.Job, resp *http.Response, httpErr error) (*infra.Job, error)

func (*STRScraper) MakeRequest

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

Jump to

Keyboard shortcuts

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