We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ddsky/gamebrain-api-clients'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
ApiDefault.hs•6.95 kB
{-
GameBrain API
GameBrain API
OpenAPI Version: 3.0.0
GameBrain API API version: 1.0.1
Contact: mail@gamebrain.co
Generated by OpenAPI Generator (https://openapi-generator.tech)
-}
{-|
Module : GameBrain.API.ApiDefault
-}
{-# 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 GameBrain.API.ApiDefault where
import GameBrain.Core
import GameBrain.MimeTypes
import GameBrain.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
-- ** Default
-- *** detail
-- | @GET \/games\/{id}@
--
-- Get Game Details
--
-- Get all the details about a game given its id. Details include screenshots, ratings, release dates, videos, description, tags, and much more.
--
-- AuthMethod: 'AuthApiKeyApiKey', 'AuthApiKeyHeaderApiKey'
--
detail
:: Id -- ^ "id" - The unique identifier of the game.
-> ApiKey -- ^ "apiKey" - Your API key for authentication.
-> GameBrainRequest Detail MimeNoContent GameResponse MimeJSON
detail (Id id) (ApiKey apiKey) =
_mkRequest "GET" ["/games/",toPath id]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyHeaderApiKey)
`addQuery` toQuery ("api-key", Just apiKey)
data Detail
-- | @application/json@
instance Produces Detail MimeJSON
-- *** news
-- | @GET \/games\/{id}\/news@
--
-- Get Game News
--
-- Get news related to the given game.
--
-- AuthMethod: 'AuthApiKeyApiKey', 'AuthApiKeyHeaderApiKey'
--
news
:: Id -- ^ "id"
-> Offset -- ^ "offset"
-> Limit -- ^ "limit"
-> ApiKey -- ^ "apiKey"
-> GameBrainRequest News MimeNoContent GameNewsResponse MimeJSON
news (Id id) (Offset offset) (Limit limit) (ApiKey apiKey) =
_mkRequest "GET" ["/games/",toPath id,"/news"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyHeaderApiKey)
`addQuery` toQuery ("offset", Just offset)
`addQuery` toQuery ("limit", Just limit)
`addQuery` toQuery ("api-key", Just apiKey)
data News
-- | @application/json@
instance Produces News MimeJSON
-- *** search
-- | @GET \/games@
--
-- Search Games
--
-- Search hundreds of thousands of video games from over 70 platforms. The query can be a game name, a platform, a genre, or any combination
--
-- AuthMethod: 'AuthApiKeyApiKey', 'AuthApiKeyHeaderApiKey'
--
search
:: Query -- ^ "query" - The search query, e.g., game name, platform, genre, or any combination.
-> Offset -- ^ "offset" - The number of results to skip before starting to collect the result set. Between 0 and 1000.
-> Limit -- ^ "limit" - The maximum number of results to return between 1 and 10.
-> Filters -- ^ "filters" - JSON array of filter objects to apply to the search.
-> Sort -- ^ "sort" - The field by which to sort the results, either computed_rating, price, or release_date
-> SortOrder -- ^ "sortOrder" - The sort order: 'asc' for ascending or 'desc' for descending.
-> GenerateFilterOptions -- ^ "generateFilterOptions" - Whether to generate filter options in the response.
-> ApiKey -- ^ "apiKey" - Your API key for authentication.
-> GameBrainRequest Search MimeNoContent SearchResponse MimeJSON
search (Query query) (Offset offset) (Limit limit) (Filters filters) (Sort sort) (SortOrder sortOrder) (GenerateFilterOptions generateFilterOptions) (ApiKey apiKey) =
_mkRequest "GET" ["/games"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyHeaderApiKey)
`addQuery` toQuery ("query", Just query)
`addQuery` toQuery ("offset", Just offset)
`addQuery` toQuery ("limit", Just limit)
`addQuery` toQuery ("filters", Just filters)
`addQuery` toQuery ("sort", Just sort)
`addQuery` toQuery ("sort-order", Just sortOrder)
`addQuery` toQuery ("generate-filter-options", Just generateFilterOptions)
`addQuery` toQuery ("api-key", Just apiKey)
data Search
-- | @application/json@
instance Produces Search MimeJSON
-- *** similar
-- | @GET \/games\/{id}\/similar@
--
-- Get Similar Games
--
-- Get games that are similar to the given one.
--
-- AuthMethod: 'AuthApiKeyApiKey', 'AuthApiKeyHeaderApiKey'
--
similar
:: Id -- ^ "id"
-> Limit -- ^ "limit"
-> ApiKey -- ^ "apiKey"
-> GameBrainRequest Similar MimeNoContent SimilarGamesResponse MimeJSON
similar (Id id) (Limit limit) (ApiKey apiKey) =
_mkRequest "GET" ["/games/",toPath id,"/similar"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyHeaderApiKey)
`addQuery` toQuery ("limit", Just limit)
`addQuery` toQuery ("api-key", Just apiKey)
data Similar
-- | @application/json@
instance Produces Similar MimeJSON
-- *** suggest
-- | @GET \/games\/suggestions@
--
-- Get Game Suggestions
--
-- Get game suggestions based on (partial) search queries. For example, the query 'gt' will return games like GTA.
--
-- AuthMethod: 'AuthApiKeyApiKey', 'AuthApiKeyHeaderApiKey'
--
suggest
:: Query -- ^ "query" - The partial search query to get suggestions for.
-> Limit -- ^ "limit" - The maximum number of suggestions to return.
-> ApiKey -- ^ "apiKey" - Your API key for authentication.
-> GameBrainRequest Suggest MimeNoContent SearchSuggestionResponse MimeJSON
suggest (Query query) (Limit limit) (ApiKey apiKey) =
_mkRequest "GET" ["/games/suggestions"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyHeaderApiKey)
`addQuery` toQuery ("query", Just query)
`addQuery` toQuery ("limit", Just limit)
`addQuery` toQuery ("api-key", Just apiKey)
data Suggest
-- | @application/json@
instance Produces Suggest MimeJSON