к
Size: a a a
к
Ф
Ф
Ф
AN
Ф
AN
MP
MP
AK
AK
AW
bitcoinYesterdayPriceDecoder : Decoder Float
bitcoinYesterdayPriceDecoder =
Decode.at
[ "bpi", "2017-10-03" ]
Decode.float
Вл
bitcoinYesterdayPriceDecoder : Decoder Float
bitcoinYesterdayPriceDecoder =
Decode.at
[ "bpi", "2017-10-03" ]
Decode.float
AW
EK
Вл
bitcoinYesterdayPriceDecoder : Decoder Float
bitcoinYesterdayPriceDecoder =
Decode.at
[ "bpi", "2017-10-03" ]
Decode.float
AW
bitcoinYesterdayPriceDecoder : Decoder Float
bitcoinYesterdayPriceDecoder =
Decode.at
[ "bpi", "2017-10-03" ]
Decode.float
List ( String, Float )
:bpiDecoder : Decoder (List ( String, Float ))
bpiDecoder =
Decode.field "bpi" <| Decode.keyValuePairs Decode.float
HandleYesterdayBitcoinPrice result ->
case result of
Ok listOfTuples ->
case List.head listOfTuples of
Just ( _, price ) ->
{ model | yesterdayPrice = toString price } ! []
Nothing ->
{ model | apiResponseError = "Nothing" } ! []
Err error ->
{ model | apiResponseError = toString error } ! []
AW
AB