module Github.Gists (
gists,
gists',
gistsR,
gist,
gist',
gistR,
module Github.Data,
) where
import Data.Vector (Vector)
import Github.Auth
import Github.Data
import Github.Request
gists' :: Maybe GithubAuth -> Name GithubOwner -> IO (Either Error (Vector Gist))
gists' auth user =
executeRequestMaybe auth $ gistsR user Nothing
gists :: Name GithubOwner -> IO (Either Error (Vector Gist))
gists = gists' Nothing
gistsR :: Name GithubOwner -> Maybe Count -> GithubRequest k (Vector Gist)
gistsR user = GithubPagedGet ["users", toPathPart user, "gists"] []
gist' :: Maybe GithubAuth -> Name Gist -> IO (Either Error Gist)
gist' auth gid =
executeRequestMaybe auth $ gistR gid
gist :: Name Gist -> IO (Either Error Gist)
gist = gist' Nothing
gistR :: Name Gist ->GithubRequest k Gist
gistR gid =
GithubGet ["gists", toPathPart gid] []