-- | <http://strava.github.io/api/v3/photos/>
module Strive.Actions.Photos
  ( getActivityPhotos
  ) where

import Network.HTTP.Types (Query)
import Strive.Aliases (ActivityId, Result)
import Strive.Client (Client)
import Strive.Internal.HTTP (get)
import Strive.Types (PhotoSummary)

-- | <http://strava.github.io/api/v3/photos/#list>
getActivityPhotos :: Client -> ActivityId -> IO (Result [PhotoSummary])
getActivityPhotos :: Client -> ActivityId -> IO (Result [PhotoSummary])
getActivityPhotos Client
client ActivityId
activityId = Client -> String -> Query -> IO (Result [PhotoSummary])
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/activities/" String -> String -> String
forall a. [a] -> [a] -> [a]
++ ActivityId -> String
forall a. Show a => a -> String
show ActivityId
activityId String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
"/photos"
    query :: Query
query = [] :: Query