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
Default.elm•3.5 kB
{-
GameBrain API
GameBrain API
The version of the OpenAPI document: 1.0.1
Contact: mail@gamebrain.co
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
DO NOT EDIT THIS FILE MANUALLY.
For more info on generating Elm code, see https://eriktim.github.io/openapi-elm/
-}
module Api.Request.Default exposing
( detail
, news
, search
, similar
, suggest
)
import Api
import Api.Data exposing (..)
import Dict
import Http
import Json.Decode
import Json.Encode
{-| Get all the details about a game given its id. Details include screenshots, ratings, release dates, videos, description, tags, and much more.
-}
detail : Int -> String -> Api.Request Api.Data.GameResponse
detail id_path apiKey_query =
Api.request
"GET"
"/games/{id}"
[ ( "id", String.fromInt id_path ) ]
[ ( "api-key", Just <| identity apiKey_query ) ]
[]
Nothing
Api.Data.gameResponseDecoder
{-| Get news related to the given game.
-}
news : Int -> Int -> Int -> String -> Api.Request Api.Data.GameNewsResponse
news id_path offset_query limit_query apiKey_query =
Api.request
"GET"
"/games/{id}/news"
[ ( "id", String.fromInt id_path ) ]
[ ( "offset", Just <| String.fromInt offset_query ), ( "limit", Just <| String.fromInt limit_query ), ( "api-key", Just <| identity apiKey_query ) ]
[]
Nothing
Api.Data.gameNewsResponseDecoder
{-| 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
-}
search : String -> Int -> Int -> String -> String -> String -> Bool -> String -> Api.Request Api.Data.SearchResponse
search query_query offset_query limit_query filters_query sort_query sortOrder_query generateFilterOptions_query apiKey_query =
Api.request
"GET"
"/games"
[]
[ ( "query", Just <| identity query_query ), ( "offset", Just <| String.fromInt offset_query ), ( "limit", Just <| String.fromInt limit_query ), ( "filters", Just <| identity filters_query ), ( "sort", Just <| identity sort_query ), ( "sort-order", Just <| identity sortOrder_query ), ( "generate-filter-options", Just <| (\val -> if val then "true" else "false") generateFilterOptions_query ), ( "api-key", Just <| identity apiKey_query ) ]
[]
Nothing
Api.Data.searchResponseDecoder
{-| Get games that are similar to the given one.
-}
similar : Int -> Int -> String -> Api.Request Api.Data.SimilarGamesResponse
similar id_path limit_query apiKey_query =
Api.request
"GET"
"/games/{id}/similar"
[ ( "id", String.fromInt id_path ) ]
[ ( "limit", Just <| String.fromInt limit_query ), ( "api-key", Just <| identity apiKey_query ) ]
[]
Nothing
Api.Data.similarGamesResponseDecoder
{-| Get game suggestions based on (partial) search queries. For example, the query 'gt' will return games like GTA.
-}
suggest : String -> Int -> String -> Api.Request Api.Data.SearchSuggestionResponse
suggest query_query limit_query apiKey_query =
Api.request
"GET"
"/games/suggestions"
[]
[ ( "query", Just <| identity query_query ), ( "limit", Just <| String.fromInt limit_query ), ( "api-key", Just <| identity apiKey_query ) ]
[]
Nothing
Api.Data.searchSuggestionResponseDecoder