scurry-0.1.0: A Haskell client for the Strava V3 API.

Safe HaskellNone
LanguageHaskell2010

Scurry.Actions.Internal

Description

Internal helper functions for performing actions.

Synopsis

Documentation

buildRequest :: Client -> Resource -> SimpleQuery -> IO Request Source

Build a request by constructing the URL and appending the access token.

decodeResponse :: FromJSON a => Response ByteString -> Either String a Source

Decode a response by parsing its body as JSON.

get :: FromJSON a => Client -> Resource -> SimpleQuery -> IO (Either String a) Source

Get the given resource.

makeRequest :: Client -> Request -> IO (Response ByteString) Source

Make an HTTP request using the client's manager.

paginate :: Page -> PerPage -> SimpleQuery Source

Convert pagination parameters into a query.