getsurance / elm-street / ElmStreet.AutocompletePrediction

Type aliases for Google Autocomplete api

Type aliases


type alias AutocompletePrediction =
{ description : String
, id : String
, matcheSubstrings : List PredictionSubstring
, placeId : String
, reference : String
, structuredFormatting : StructuredFormatting
, terms : List PredictionTerm
, types : List String 
}

Type alias for objects of type AutcompletePrediction


type alias StructuredFormatting =
{ mainText : String
, mainTextPredictionSubstrings : List PredictionSubstring
, secondaryText : String 
}

Type alias for objects of type StructuredFormatting


type alias PredictionTerm =
{ offset : Basics.Int
, value : String 
}

Type alias for objects of type PredictionPredictionTerm


type alias PredictionSubstring =
{ length : Basics.Int
, offset : Basics.Int 
}

Type alias for objects of type PredictionSubstring

Decoding

decoder : Json.Decode.Decoder AutocompletePrediction

Decoder of AutcompletePrediction

decodeList : Json.Decode.Decoder (List AutocompletePrediction)

Decoder for list of AutcompletePrediction