http

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFromFile

func GetFromFile(p string, into any) error

Types

type ActivePropertiesData

type ActivePropertiesData struct {
	Total  int   `json:"total"`
	Result []int `json:"result"`
}

type BannersResponse

type BannersResponse model.PaginatedResponse[[]model.Banner]

type BrokersResponse

type BrokersResponse model.PaginatedResponse[[]model.Broker]

type CondominiumsResponse

type CondominiumsResponse model.PaginatedResponse[[]model.Condominium]

type PropertiesResponse

type PropertiesResponse model.PaginatedResponse[[]model.Property]

type Requester

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

func NewRequester

func NewRequester(maxPages int, concurrentRequest int) *Requester

func (Requester) GetActiveProperties

func (r Requester) GetActiveProperties() ([]int, error)

func (Requester) GetBanners

func (r Requester) GetBanners() ([]model.Banner, error)

func (Requester) GetBrokers

func (r Requester) GetBrokers() ([]model.Broker, error)

func (Requester) GetCondominiums

func (r Requester) GetCondominiums() ([]model.Condominium, error)

func (Requester) GetProperties

func (r Requester) GetProperties(startDate *time.Time) ([]model.Property, error)

func (*Requester) SetWebserviceKey

func (r *Requester) SetWebserviceKey(k string)

type RoutePath

type RoutePath string
const (
	ActivePropertiesPath RoutePath = "imoveis-ativos"
	BannersPath          RoutePath = "banners"
	BrokersPath          RoutePath = "corretores"
	CondominiumPath      RoutePath = "condominios"
	PropertiesPath       RoutePath = "imoveis"

	WebserviceEndpoint = "https://api.jetimob.com/webservice"
	WebserviceVersion  = "v5"
)

Jump to

Keyboard shortcuts

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