UNPKG

@space-cow-media/spellbook-client

Version:

An Open Api generated client for the Commander Spellbook backend REST API.

151 lines (102 loc) 3.42 kB
# DefaultApi All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**rootFormattedRetrieve**](DefaultApi.md#rootformattedretrieve) | **GET** /{format} | | | [**rootRetrieve**](DefaultApi.md#rootretrieve) | **GET** / | | ## rootFormattedRetrieve > { [key: string]: any; } rootFormattedRetrieve(format) ### Example ```ts import { Configuration, DefaultApi, } from ''; import type { RootFormattedRetrieveRequest } from ''; async function example() { console.log("🚀 Testing SDK..."); const config = new Configuration({ // To configure HTTP basic authorization: basicAuth username: "YOUR USERNAME", password: "YOUR PASSWORD", // To configure API key authorization: cookieAuth apiKey: "YOUR API KEY", // Configure HTTP bearer authorization: jwtAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DefaultApi(config); const body = { // '.json' format: format_example, } satisfies RootFormattedRetrieveRequest; try { const data = await api.rootFormattedRetrieve(body); console.log(data); } catch (error) { console.error(error); } } // Run the test example().catch(console.error); ``` ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **format** | `.json` | | [Defaults to `undefined`] [Enum: .json] | ### Return type **{ [key: string]: any; }** ### Authorization [basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [jwtAuth](../README.md#jwtAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: `application/json` ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) ## rootRetrieve > { [key: string]: any; } rootRetrieve() ### Example ```ts import { Configuration, DefaultApi, } from ''; import type { RootRetrieveRequest } from ''; async function example() { console.log("🚀 Testing SDK..."); const config = new Configuration({ // To configure HTTP basic authorization: basicAuth username: "YOUR USERNAME", password: "YOUR PASSWORD", // To configure API key authorization: cookieAuth apiKey: "YOUR API KEY", // Configure HTTP bearer authorization: jwtAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DefaultApi(config); try { const data = await api.rootRetrieve(); console.log(data); } catch (error) { console.error(error); } } // Run the test example().catch(console.error); ``` ### Parameters This endpoint does not need any parameter. ### Return type **{ [key: string]: any; }** ### Authorization [basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [jwtAuth](../README.md#jwtAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: `application/json` ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)