-----------------------------------------------------------------------------
-- |
-- License     :  BSD-3-Clause
-- Maintainer  :  Oleg Grenrus <oleg.grenrus@iki.fi>
--
-- The API for dealing with git blobs from Github repos, as described in
-- <http://developer.github.com/v3/git/blobs/>.
module GitHub.Endpoints.GitData.Blobs (
    blobR,
    module GitHub.Data,
    ) where

import GitHub.Data
import Prelude ()

-- | Query a blob.
-- See <https://developer.github.com/v3/git/blobs/#get-a-blob>
blobR :: Name Owner -> Name Repo -> Name Blob -> Request k Blob
blobR :: Name Owner -> Name Repo -> Name Blob -> Request k Blob
blobR Name Owner
user Name Repo
repo Name Blob
sha =
    Paths -> QueryString -> Request k Blob
forall (mt :: RW) a. Paths -> QueryString -> Request mt a
query [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"git", Text
"blobs", Name Blob -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Blob
sha] []