trm

package module
v0.5.2-0...-97579f1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 7 Imported by: 0

README

EASI - The Right Move API Go Client

This repo is home to both an unofficial Go client for the EASI - The Right Move API and an unofficial gateway for those who wish to use JSON. I am in no way affiliated with EASI, other than as a user of their API.

From the EASI page for The Right Move API:

The Right Move API is designed to let you generate applications which assist in location, neighborhood, and site evaluation. This ground-breaking API will allow you to offer prospective homeowners, realtors, brokers, and anyone evaluating a location, key current neighborhood demographics. Using EASI's industry tested report engines, this API will allow developers to generate updated an demographic summary of the area around a user specified set of coordinates (in the US only), with a radius between .05 and 10 miles.

Gateway Service

Check out the gateway service that enables developers to consume the EASI -The Right Move API using JSON rather than SOAP!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

APIClient handles communicating with the EASI servers

func NewAPIClient

func NewAPIClient(devKey string, c *http.Client) *APIClient

NewAPIClient initializes an APIClient into a ready-to-use state

func (*APIClient) GetReport

func (c *APIClient) GetReport(request *ReportRequest, devKey string, h http.Header) ([]*FieldData, string, error)

GetReport requests a report from the EASI servers

func (*APIClient) GetReportContext

func (c *APIClient) GetReportContext(ctx context.Context, request *ReportRequest, devKey string, h http.Header) ([]*FieldData, string, error)

GetReportContext requests a report from the EASI servers using a context

type DatasetType

type DatasetType string
const (
	DefaultDataset DatasetType = "Default"

	Census DatasetType = "Census"

	Updated DatasetType = "Updated"
)

type FeatureType

type FeatureType string
const (
	DefaultFeature FeatureType = "Default"

	Quick FeatureType = "Quick"

	Ring FeatureType = "Ring"

	ThreeRing FeatureType = "ThreeRing"

	Polygon FeatureType = "Polygon"
)

type FieldData

type FieldData struct {
	XMLName xml.Name `xml:"a:EasiAPIReport.FieldData" json:"-"`

	Description string `xml:"a:EasiDescription,omitempty" json:"Description,omitempty"`

	Name string `xml:"a:EasiName,omitempty" json:"Name,omitempty"`

	Percent string `xml:"a:EasiPercent,omitempty" json:"Percent,omitempty"`

	Rank string `xml:"a:EasiRank,omitempty" json:"Rank,omitempty"`

	Score string `xml:"a:EasiScore,omitempty" json:"Score,omitempty"`

	Value string `xml:"a:EasiValue,omitempty" json:"Value,omitempty"`

	Value2 string `xml:"a:EasiValue2,omitempty" json:"Value2,omitempty"`

	Value3 string `xml:"a:EasiValue3,omitempty" json:"Value3,omitempty"`

	Growth string `xml:"a:EasiGrowth,omitempty" json:"Growth,omitempty"`

	GrowthForecast string `xml:"a:EasiGrowthForecast,omitempty" json:"GrowthForecast,omitempty"`
}

type FieldDataSlice

type FieldDataSlice struct {
	XMLName xml.Name `xml:"a:Fields"`

	FieldData []FieldData `xml:"a:EasiAPIReport.FieldData,omitempty" json:"EasiAPIReport.FieldData,omitempty"`
}

type GeographyType

type GeographyType string
const (
	DefaultGeography GeographyType = "Default"

	ZIPCode GeographyType = "ZIPCode"

	City GeographyType = "City"

	County GeographyType = "County"

	CBSA GeographyType = "CBSA"

	State GeographyType = "State"

	US GeographyType = "US"

	BlockGroup GeographyType = "BlockGroup"

	CensusTract GeographyType = "CensusTract"
)

type ReportRequest

type ReportRequest struct {
	XMLName xml.Name `xml:"pReptRequest" json:"-"`

	XMLNSa string `xml:"xmlns:a,attr" json:"-"`

	XMLNSi string `xml:"xmlns:i,attr" json:"-"`

	Address string `xml:"a:Address,omitempty" json:"Address,omitempty"`

	BlockGroup string `xml:"a:BlockGroup,omitempty" json:"BlockGroup,omitempty"`

	CBSA string `xml:"a:CBSA,omitempty" json:"CBSA,omitempty"`

	CarrierRoute string `xml:"a:CarrierRoute,omitempty" json:"CarrierRoute,omitempty"`

	CensusTract string `xml:"a:CensusTract,omitempty" json:"CensusTract,omitempty"`

	City string `xml:"a:City,omitempty" json:"City,omitempty"`

	CongressionalDistrict string `xml:"a:CongressionalDistrict,omitempty" json:"CongressionalDistrict,omitempty"`

	County string `xml:"a:County,omitempty" json:"County,omitempty"`

	Dataset string `xml:"a:Dataset,omitempty" json:"Dataset,omitempty"`

	DatasetType DatasetType `xml:"a:DatasetType,omitempty" json:"DatasetType,omitempty"`

	DatasetYear int32 `xml:"a:DatasetYear,omitempty" json:"DatasetYear,omitempty"`

	FeatureType FeatureType `xml:"a:FeatureType,omitempty" json:"FeatureType,omitempty"`

	GeographyType GeographyType `xml:"a:GeographyType,omitempty" json:"GeographyType,omitempty"`

	GeographyValue string `xml:"a:GeographyValue,omitempty" json:"GeographyValue,omitempty"`

	Latitude float64 `xml:"a:Latitude,omitempty" json:"Latitude,omitempty"`

	Longitude float64 `xml:"a:Longitude,omitempty" json:"Longitude,omitempty"`

	Radius float64 `xml:"a:Radius,omitempty" json:"Radius,omitempty"`

	Radius2 float64 `xml:"a:Radius2,omitempty" json:"Radius2,omitempty"`

	Radius3 float64 `xml:"a:Radius3,omitempty" json:"Radius3,omitempty"`

	ReportID string `xml:"a:ReportID,omitempty" json:"ReportID,omitempty"`

	ReportTag string `xml:"a:ReportTag,omitempty" json:"ReportTag,omitempty"`

	ReportType string `xml:"a:ReportType,omitempty" json:"ReportType,omitempty"`

	Reserved string `xml:"a:Reserved,omitempty" json:"-"`

	Reserved2 string `xml:"a:Reserved2,omitempty" json:"-"`

	Reserved3 string `xml:"a:Reserved3,omitempty" json:"-"`

	SchoolDistrict string `xml:"a:SchoolDistrict,omitempty" json:"SchoolDistrict,omitempty"`

	State string `xml:"a:State,omitempty" json:"State,omitempty"`

	US string `xml:"a:US,omitempty" json:"US,omitempty"`

	UserData string `xml:"a:UserData,omitempty" json:"UserData,omitempty"`

	ZIPCode string `xml:"a:ZIPCode,omitempty" json:"ZIPCode,omitempty"`
}

type ReportResponse

type ReportResponse struct {
	XMLName xml.Name `xml:"s:Body>GetReportResponse>GetReportResult"`

	XMLNSa string `xml:"xmlns:a,attr"`

	XMLNSi string `xml:"xmlns:i,attr"`

	AreaCount int32 `xml:"a:AreaCount,omitempty" json:"AreaCount,omitempty"`

	AreaCount2 int32 `xml:"a:AreaCount2,omitempty" json:"AreaCount2,omitempty"`

	AreaCount3 int32 `xml:"a:AreaCount3,omitempty" json:"AreaCount3,omitempty"`

	BlockGroupCode string `xml:"a:BlockGroupCode,omitempty" json:"BlockGroupCode,omitempty"`

	BlockGroupCount int32 `xml:"a:BlockGroupCount,omitempty" json:"BlockGroupCount,omitempty"`

	BusinessOnly int32 `xml:"a:BusinessOnly,omitempty" json:"BusinessOnly,omitempty"`

	CBSA string `xml:"a:CBSA,omitempty" json:"CBSA,omitempty"`

	CBSACode string `xml:"a:CBSACode,omitempty" json:"CBSACode,omitempty"`

	CensusTractCode string `xml:"a:CensusTractCode,omitempty" json:"CensusTractCode,omitempty"`

	City string `xml:"a:City,omitempty" json:"City,omitempty"`

	CityCode string `xml:"a:CityCode,omitempty" json:"CityCode,omitempty"`

	County string `xml:"a:County,omitempty" json:"County,omitempty"`

	DatasetType string `xml:"a:DatasetType,omitempty" json:"DatasetType,omitempty"`

	DatasetYear int32 `xml:"a:DatasetYear,omitempty" json:"DatasetYear,omitempty"`

	DominantProfile string `xml:"a:DominantProfile,omitempty" json:"DominantProfile,omitempty"`

	FIPS string `xml:"a:FIPS,omitempty" json:"FIPS,omitempty"`

	FeatureType string `xml:"a:FeatureType,omitempty" json:"FeatureType,omitempty"`

	Fields FieldDataSlice `xml:"a:Fields,omitempty" json:"Fields,omitempty"`

	GeographyType string `xml:"a:GeographyType,omitempty" json:"GeographyType,omitempty"`

	Instance string `xml:"a:Instance,omitempty" json:"Instance,omitempty"`

	Latitude float64 `xml:"a:Latitude,omitempty" json:"Latitude,omitempty"`

	Longitude float64 `xml:"a:Longitude,omitempty" json:"Longitude,omitempty"`

	Msg string `xml:"a:Msg,omitempty" json:"Msg,omitempty"`

	MsgID int32 `xml:"a:MsgID,omitempty" json:"MsgID,omitempty"`

	PO string `xml:"a:PO,omitempty" json:"PO,omitempty"`

	Radius float64 `xml:"a:Radius,omitempty" json:"Radius,omitempty"`

	Radius2 float64 `xml:"a:Radius2,omitempty" json:"Radius2,omitempty"`

	Radius3 float64 `xml:"a:Radius3,omitempty" json:"Radius3,omitempty"`

	ReportDescription string `xml:"a:ReportDescription,omitempty" json:"ReportDescription,omitempty"`

	ReportID string `xml:"a:ReportID,omitempty" json:"ReportID,omitempty"`

	ReportName string `xml:"a:ReportName,omitempty" json:"ReportName,omitempty"`

	ReportYear int32 `xml:"a:ReportYear,omitempty" json:"ReportYear,omitempty"`

	Reserved string `xml:"a:Reserved,omitempty" json:"Reserved,omitempty"`

	Reserved2 string `xml:"a:Reserved2,omitempty" json:"Reserved2,omitempty"`

	Reserved3 string `xml:"a:Reserved3,omitempty" json:"Reserved3,omitempty"`

	State string `xml:"a:State,omitempty" json:"State,omitempty"`

	UserData string `xml:"a:UserData,omitempty" json:"UserData,omitempty"`

	ZIPCode string `xml:"a:ZIPCode,omitempty" json:"ZIPCode,omitempty"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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