-- | <http://strava.github.io/api/v3/efforts/>
module Strive.Actions.Efforts
  ( getSegmentEffort
  ) where

import Network.HTTP.Types (Query)
import Strive.Aliases (EffortId, Result)
import Strive.Client (Client)
import Strive.Internal.HTTP (get)
import Strive.Types (EffortDetailed)

-- | <http://strava.github.io/api/v3/efforts/#retrieve>
getSegmentEffort :: Client -> EffortId -> IO (Result EffortDetailed)
getSegmentEffort :: Client -> EffortId -> IO (Result EffortDetailed)
getSegmentEffort Client
client EffortId
effortId = forall q j.
(QueryLike q, FromJSON j) =>
Client -> String -> q -> IO (Result j)
get Client
client String
resource Query
query
 where
  resource :: String
resource = String
"api/v3/segment_efforts/" forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> String
show EffortId
effortId
  query :: Query
query = [] :: Query