Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AdditionalFeatures
- type BasicAuth
- type BuiltForm
- type Configuration
- type DefaultApiService
- type EnergyEfficiency
- type EnergyRating
- type FloorLevel
- type GenericOpenAPIError
- type LeaseholdOrFreehold
- type NewOrResale
- type Problem
- type PropertyFeatures
- type PropertyType
- type RequiredFeatures
- type RoofInsulation
- type RoofType
- type Valuation
- type ValuationPriceDistribution
- type WallInsulation
- type WallType
- type WindowGlazingType
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { DefaultApi *DefaultApiService // contains filtered or unexported fields }
APIClient manages communication with the AVM API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AdditionalFeatures ¶
type AdditionalFeatures struct { PriceOfPreviousSale int32 `json:"priceOfPreviousSale,omitempty"` DateOfPreviousSale string `json:"dateOfPreviousSale,omitempty"` LeaseholdOrFreehold LeaseholdOrFreehold `json:"leaseholdOrFreehold,omitempty"` WallType WallType `json:"wallType,omitempty"` WallInsulation WallInsulation `json:"wallInsulation,omitempty"` WallEnergyEfficiency EnergyEfficiency `json:"wallEnergyEfficiency,omitempty"` RoofType RoofType `json:"roofType,omitempty"` RoofInsulation RoofInsulation `json:"roofInsulation,omitempty"` RoofEnergyEfficiency EnergyEfficiency `json:"roofEnergyEfficiency,omitempty"` WindowGlazingType WindowGlazingType `json:"windowGlazingType,omitempty"` WindowEnergyEfficiency EnergyEfficiency `json:"windowEnergyEfficiency,omitempty"` CurrentEnergyRating EnergyRating `json:"currentEnergyRating,omitempty"` PotentialEnergyRating EnergyRating `json:"potentialEnergyRating,omitempty"` AnnualHeatingCostInPounds int32 `json:"annualHeatingCostInPounds,omitempty"` AnnualHotWaterCostInPounds int32 `json:"annualHotWaterCostInPounds,omitempty"` AnnualLightingCostInPounds int32 `json:"annualLightingCostInPounds,omitempty"` AnnualEnergyConsumptionInKWh int32 `json:"annualEnergyConsumptionInKWh,omitempty"` FloorHeightInFoot float32 `json:"floorHeightInFoot,omitempty"` BuiltForm BuiltForm `json:"builtForm,omitempty"` }
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BuiltForm ¶
type BuiltForm string
const ( BUILT_FORM_DETACHED BuiltForm = "detached" BUILT_FORM_SEMI_DETACHED BuiltForm = "semi_detached" BUILT_FORM_ENCLOSED_MID_TERRACE BuiltForm = "enclosed_mid_terrace" BUILT_FORM_ENCLOSED_END_TERRACE BuiltForm = "enclosed_end_terrace" BUILT_FORM_END_TERRACE BuiltForm = "end_terrace" BUILT_FORM_MID_TERRACE BuiltForm = "mid_terrace" )
List of BuiltForm
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type DefaultApiService ¶
type DefaultApiService service
func (*DefaultApiService) GetFastValuation ¶
func (a *DefaultApiService) GetFastValuation(ctx context.Context, propertyFeatures PropertyFeatures) (int32, *http.Response, error)
DefaultApiService Get only property price valuation without confidence estimation
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param propertyFeatures Property features that describe property
@return int32
func (*DefaultApiService) GetValuation ¶
func (a *DefaultApiService) GetValuation(ctx context.Context, propertyFeatures PropertyFeatures) (Valuation, *http.Response, error)
DefaultApiService Get property price valuation with confidence estimation
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param propertyFeatures Property features to valuate
@return Valuation
type EnergyEfficiency ¶
type EnergyEfficiency string
const ( ENERGY_EFFICIENCY_AVERAGE EnergyEfficiency = "average" ENERGY_EFFICIENCY_GOOD EnergyEfficiency = "good" ENERGY_EFFICIENCY_POOR EnergyEfficiency = "poor" ENERGY_EFFICIENCY_VERY_GOOD EnergyEfficiency = "very_good" ENERGY_EFFICIENCY_VERY_POOR EnergyEfficiency = "very_poor" )
List of EnergyEfficiency
type EnergyRating ¶
type EnergyRating string
const ( ENERGY_RATING_A EnergyRating = "A" ENERGY_RATING_B EnergyRating = "B" ENERGY_RATING_C EnergyRating = "C" ENERGY_RATING_D EnergyRating = "D" ENERGY_RATING_E EnergyRating = "E" ENERGY_RATING_F EnergyRating = "F" ENERGY_RATING_G EnergyRating = "G" ENERGY_RATING_I EnergyRating = "I" )
List of EnergyRating
type FloorLevel ¶
type FloorLevel string
FloorLevel : Floor level
const ( FLOOR_LEVEL_BASEMENT FloorLevel = "basement" FLOOR_LEVEL_GROUND FloorLevel = "ground" FLOOR_LEVEL_MIDDLE FloorLevel = "middle" FLOOR_LEVEL_TOP FloorLevel = "top" FLOOR_LEVEL_FLOOR_1 FloorLevel = "floor_1" FLOOR_LEVEL_FLOOR_2 FloorLevel = "floor_2" FLOOR_LEVEL_FLOOR_3 FloorLevel = "floor_3" FLOOR_LEVEL_FLOOR_4 FloorLevel = "floor_4" FLOOR_LEVEL_FLOOR_5 FloorLevel = "floor_5" FLOOR_LEVEL_FLOOR_6 FloorLevel = "floor_6" FLOOR_LEVEL_FLOOR_7 FloorLevel = "floor_7" FLOOR_LEVEL_FLOOR_8 FloorLevel = "floor_8" FLOOR_LEVEL_FLOOR_9 FloorLevel = "floor_9" FLOOR_LEVEL_FLOOR_10 FloorLevel = "floor_10" FLOOR_LEVEL_FLOOR_11 FloorLevel = "floor_11" FLOOR_LEVEL_FLOOR_12 FloorLevel = "floor_12" FLOOR_LEVEL_FLOOR_13 FloorLevel = "floor_13" FLOOR_LEVEL_FLOOR_14 FloorLevel = "floor_14" FLOOR_LEVEL_FLOOR_15 FloorLevel = "floor_15" FLOOR_LEVEL_FLOOR_16 FloorLevel = "floor_16" FLOOR_LEVEL_FLOOR_17 FloorLevel = "floor_17" FLOOR_LEVEL_FLOOR_18 FloorLevel = "floor_18" FLOOR_LEVEL_FLOOR_19 FloorLevel = "floor_19" FLOOR_LEVEL_FLOOR_20 FloorLevel = "floor_20" FLOOR_LEVEL_FLOOR_21_OR_ABOVE FloorLevel = "floor_21_or_above" )
List of FloorLevel
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type LeaseholdOrFreehold ¶
type LeaseholdOrFreehold string
const ( LEASEHOLD_OR_FREEHOLD_FREEHOLD LeaseholdOrFreehold = "freehold" LEASEHOLD_OR_FREEHOLD_LEASEHOLD LeaseholdOrFreehold = "leasehold" )
List of LeaseholdOrFreehold
type NewOrResale ¶
type NewOrResale string
const ( NEW_OR_RESALE_NEW NewOrResale = "new" NEW_OR_RESALE_RESALE NewOrResale = "resale" )
List of NewOrResale
type Problem ¶
type Problem struct { // A relative URI reference that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g. using HTML). Type string `json:"type,omitempty"` // A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized) Title string `json:"title,omitempty"` // The HTTP status code generated by the origin server for this occurrence of the problem. Status int32 `json:"status,omitempty"` // A human-readable explanation specific to this occurrence of the problem Detail string `json:"detail,omitempty"` // A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. Instance string `json:"instance,omitempty"` }
A Problem Details object (RFC 7807)
type PropertyFeatures ¶
type PropertyFeatures struct { RequiredFeatures RequiredFeatures `json:"requiredFeatures"` AdditionalFeatures AdditionalFeatures `json:"additionalFeatures,omitempty"` }
type PropertyType ¶
type PropertyType string
PropertyType : type of property
const ( PROPERTY_TYPE_FLAT PropertyType = "flat" PROPERTY_TYPE_SEMI_DETACHED_HOUSE PropertyType = "semi_detached_house" PROPERTY_TYPE_DETACHED_HOUSE PropertyType = "detached_house" PROPERTY_TYPE_TERRACED_HOUSE PropertyType = "terraced_house" )
List of PropertyType
type RequiredFeatures ¶
type RequiredFeatures struct { // Postcode Postcode string `json:"postcode"` NewOrResale NewOrResale `json:"newOrResale"` FloorLevel FloorLevel `json:"floorLevel"` // Floor area (sqf) TotalFloorAreaInSqf int32 `json:"totalFloorAreaInSqf"` PropertyType PropertyType `json:"propertyType"` NumberOfRooms int32 `json:"numberOfRooms"` }
type RoofInsulation ¶
type RoofInsulation string
const ( ROOF_INSULATION_NO RoofInsulation = "no" ROOF_INSULATION_PARTIAL RoofInsulation = "partial" ROOF_INSULATION_INSULATED RoofInsulation = "insulated" ROOF_INSULATION_ADDITIONAL RoofInsulation = "additional" ROOF_INSULATION_DWELLING RoofInsulation = "dwelling" )
List of RoofInsulation
type Valuation ¶
type Valuation struct { // Predicted price, pound MostProbablePrice int32 `json:"mostProbablePrice,omitempty"` // Lower price boundary, pound PriceRangeFrom int32 `json:"priceRangeFrom,omitempty"` // Higher price boundary, pound PriceRangeTo int32 `json:"priceRangeTo,omitempty"` // Probability (in percents) that actual price is within the specified boundaries Confidence int32 `json:"confidence,omitempty"` // Describes the probabilities (in percents) that actual price is within particular subranges PriceDistribution []ValuationPriceDistribution `json:"priceDistribution,omitempty"` }
type WallInsulation ¶
type WallInsulation string
const ( WALL_INSULATION_NO WallInsulation = "no" WALL_INSULATION_PARTIAL WallInsulation = "partial" WALL_INSULATION_INSULATED WallInsulation = "insulated" WALL_INSULATION_ADDITIONAL WallInsulation = "additional" )
List of WallInsulation
type WallType ¶
type WallType string
const ( WALL_TYPE_CAVITY_WALL WallType = "cavity_wall" WALL_TYPE_COB WallType = "cob" WALL_TYPE_GRANITE_OR_WHIN WallType = "granite_or_whin" WALL_TYPE_PARK_HOME_WALL WallType = "park_home_wall" WALL_TYPE_SANDSTONE WallType = "sandstone" WALL_TYPE_SOLID_BRICK WallType = "solid_brick" WALL_TYPE_SYSTEM_BUILD WallType = "system_build" WALL_TYPE_TIMBER_FRAME WallType = "timber_frame" )
List of WallType
type WindowGlazingType ¶
type WindowGlazingType string
const ( WINDOW_GLAZING_TYPE_SINGLE WindowGlazingType = "single" WINDOW_GLAZING_TYPE_SECONDARY WindowGlazingType = "secondary" WINDOW_GLAZING_TYPE_DOUBLE WindowGlazingType = "double" WINDOW_GLAZING_TYPE_TRIPLE WindowGlazingType = "triple" WINDOW_GLAZING_TYPE_MULTIPLE WindowGlazingType = "multiple" WINDOW_GLAZING_TYPE_PERFORMANCE WindowGlazingType = "high_performance" )
List of WindowGlazingType
Source Files
¶
- api_default.go
- client.go
- configuration.go
- model_additional_features.go
- model_built_form.go
- model_energy_efficiency.go
- model_energy_rating.go
- model_floor_level.go
- model_leasehold_or_freehold.go
- model_new_or_resale.go
- model_problem.go
- model_property_features.go
- model_property_type.go
- model_required_features.go
- model_roof_insulation.go
- model_roof_type.go
- model_valuation.go
- model_valuation_price_distribution.go
- model_wall_insulation.go
- model_wall_type.go
- model_window_glazing_type.go
- response.go