module GitHub.Endpoints.Repos.Statuses (
createStatusR,
statusesForR,
statusForR,
module GitHub.Data
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
createStatusR :: Name Owner -> Name Repo -> Name Commit -> NewStatus -> Request 'RW Status
createStatusR :: Name Owner
-> Name Repo -> Name Commit -> NewStatus -> Request 'RW Status
createStatusR Name Owner
owner Name Repo
repo Name Commit
sha =
forall a. CommandMethod -> Paths -> ByteString -> Request 'RW a
command CommandMethod
Post Paths
parts forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. ToJSON a => a -> ByteString
encode
where
parts :: Paths
parts = [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
owner, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"statuses", forall a. IsPathPart a => a -> Text
toPathPart Name Commit
sha]
statusesForR :: Name Owner -> Name Repo -> Name Commit -> FetchCount -> Request 'RW (Vector Status)
statusesForR :: Name Owner
-> Name Repo
-> Name Commit
-> FetchCount
-> Request 'RW (Vector Status)
statusesForR Name Owner
user Name Repo
repo Name Commit
sha =
forall a (mt :: RW).
FromJSON a =>
Paths -> QueryString -> FetchCount -> Request mt (Vector a)
pagedQuery [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"commits", forall a. IsPathPart a => a -> Text
toPathPart Name Commit
sha, Text
"statuses"] []
statusForR :: Name Owner -> Name Repo -> Name Commit -> Request 'RW CombinedStatus
statusForR :: Name Owner
-> Name Repo -> Name Commit -> Request 'RW CombinedStatus
statusForR Name Owner
user Name Repo
repo Name Commit
sha =
forall (mt :: RW) a. Paths -> QueryString -> Request mt a
query [Text
"repos", forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"commits", forall a. IsPathPart a => a -> Text
toPathPart Name Commit
sha, Text
"status"] []