Documentation ¶
Index ¶
Constants ¶
View Source
const BaseUrl = "https://marknad.sgsstudentbostader.se"
View Source
const (
PrefToken = "sgs.token"
)
Variables ¶
View Source
var DefaultHeaders = map[string]string{
"User-Agent": "gucli/1.0",
"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded",
}
View Source
var DefaultMarkets = map[string]int{
"direkt": 100,
"torget": 101,
"fortur": 102,
"sistam": 103,
}
Functions ¶
Types ¶
type AuthResult ¶
func AuthResultFromData ¶
func AuthResultFromData(data map[string]interface{}) AuthResult
func (*AuthResult) SyncPrefs ¶
func (result *AuthResult) SyncPrefs()
type AuthUtility ¶
type AuthUtility struct {
// contains filtered or unexported fields
}
func (*AuthUtility) GetData ¶
func (utility *AuthUtility) GetData() url.Values
func (*AuthUtility) GetPath ¶
func (utility *AuthUtility) GetPath() (string, string)
func (*AuthUtility) GetResp ¶
func (utility *AuthUtility) GetResp(response io.Reader) interface{}
type SearchResult ¶
type SearchResult struct { TotalCount int Items []SearchResultItem }
func SearchResultFromData ¶
func SearchResultFromData(data map[string]interface{}) SearchResult
type SearchResultItem ¶
type SearchResultItem struct { SeekArea string Address string Description string Area string Floor string LastDay string FreeFrom string Rent float64 Properties []SearchResultItemProperty }
func SearchResultItemFromData ¶
func SearchResultItemFromData(data map[string]interface{}) SearchResultItem
type SearchResultItemProperty ¶
type SearchResultItemProperty struct {
Description string
}
func SearchResultItemPropertyFromData ¶
func SearchResultItemPropertyFromData( data map[string]interface{}) SearchResultItemProperty
type SearchUtility ¶
type SearchUtility struct {
Market int
}
func (*SearchUtility) GetData ¶
func (utility *SearchUtility) GetData() url.Values
func (*SearchUtility) GetPath ¶
func (utility *SearchUtility) GetPath() (string, string)
func (*SearchUtility) GetResp ¶
func (utility *SearchUtility) GetResp(response io.Reader) interface{}
func (*SearchUtility) GetSearchData ¶
func (utility *SearchUtility) GetSearchData() map[string]interface{}
Click to show internal directories.
Click to hide internal directories.