gitea-api-1.19.4.0: lib/Gitea/API/Miscellaneous.hs
{-
Gitea API.
This documentation describes the Gitea API.
OpenAPI Version: 3.0.1
Gitea API. API version: 1.19.4
Generated by OpenAPI Generator (https://openapi-generator.tech)
-}
{-|
Module : Gitea.API.Miscellaneous
-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MonoLocalBinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
module Gitea.API.Miscellaneous where
import Gitea.Core
import Gitea.MimeTypes
import Gitea.Model as M
import qualified Data.Aeson as A
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
import qualified Data.Foldable as P
import qualified Data.Map as Map
import qualified Data.Maybe as P
import qualified Data.Proxy as P (Proxy(..))
import qualified Data.Set as Set
import qualified Data.String as P
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL
import qualified Data.Time as TI
import qualified Network.HTTP.Client.MultipartFormData as NH
import qualified Network.HTTP.Media as ME
import qualified Network.HTTP.Types as NH
import qualified Web.FormUrlEncoded as WH
import qualified Web.HttpApiData as WH
import Data.Text (Text)
import GHC.Base ((<|>))
import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
import qualified Prelude as P
-- * Operations
-- ** Miscellaneous
-- *** getNodeInfo
-- | @GET \/nodeinfo@
--
-- Returns the nodeinfo of the Gitea application
--
-- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken'
--
getNodeInfo
:: GiteaRequest GetNodeInfo MimeNoContent NodeInfo MimeJSON
getNodeInfo =
_mkRequest "GET" ["/nodeinfo"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken)
data GetNodeInfo
-- | @application/json@
instance Produces GetNodeInfo MimeJSON
-- *** getSigningKey
-- | @GET \/signing-key.gpg@
--
-- Get default signing-key.gpg
--
-- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken'
--
getSigningKey
:: GiteaRequest GetSigningKey MimeNoContent Text MimePlainText
getSigningKey =
_mkRequest "GET" ["/signing-key.gpg"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken)
data GetSigningKey
-- | @text/plain@
instance Produces GetSigningKey MimePlainText
-- *** getVersion
-- | @GET \/version@
--
-- Returns the version of the Gitea application
--
-- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken'
--
getVersion
:: GiteaRequest GetVersion MimeNoContent ServerVersion MimeJSON
getVersion =
_mkRequest "GET" ["/version"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken)
data GetVersion
-- | @application/json@
instance Produces GetVersion MimeJSON
-- *** renderMarkdown
-- | @POST \/markdown@
--
-- Render a markdown document as HTML
--
-- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken'
--
renderMarkdown
:: (Consumes RenderMarkdown MimeJSON)
=> GiteaRequest RenderMarkdown MimeJSON Text MimeTextHtml
renderMarkdown =
_mkRequest "POST" ["/markdown"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken)
data RenderMarkdown
instance HasBodyParam RenderMarkdown MarkdownOption
-- | @application/json@
instance Consumes RenderMarkdown MimeJSON
-- | @text/html@
instance Produces RenderMarkdown MimeTextHtml
-- *** renderMarkdownRaw
-- | @POST \/markdown\/raw@
--
-- Render raw markdown as HTML
--
-- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken'
--
renderMarkdownRaw
:: (Consumes RenderMarkdownRaw MimePlainText, MimeRender MimePlainText Body)
=> Body -- ^ "body" - Request body to render
-> GiteaRequest RenderMarkdownRaw MimePlainText Text MimeTextHtml
renderMarkdownRaw body =
_mkRequest "POST" ["/markdown/raw"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader)
`_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken)
`setBodyParam` body
data RenderMarkdownRaw
-- | /Body Param/ "body" - Request body to render
instance HasBodyParam RenderMarkdownRaw Body
-- | @text/plain@
instance Consumes RenderMarkdownRaw MimePlainText
-- | @text/html@
instance Produces RenderMarkdownRaw MimeTextHtml