@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
151 lines (102 loc) • 3.65 kB
Markdown
# EstimateBracketApi
All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**estimateBracketCreate**](EstimateBracketApi.md#estimatebracketcreate) | **POST** /estimate-bracket | |
| [**estimateBracketRetrieve**](EstimateBracketApi.md#estimatebracketretrieve) | **GET** /estimate-bracket | |
## estimateBracketCreate
> EstimateBracketResult estimateBracketCreate(deckRequest)
### Example
```ts
import {
Configuration,
EstimateBracketApi,
} from '';
import type { EstimateBracketCreateRequest } 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 EstimateBracketApi(config);
const body = {
// DeckRequest (optional)
deckRequest: ...,
} satisfies EstimateBracketCreateRequest;
try {
const data = await api.estimateBracketCreate(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **deckRequest** | [DeckRequest](DeckRequest.md) | | [Optional] |
### Return type
[**EstimateBracketResult**](EstimateBracketResult.md)
### Authorization
[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [jwtAuth](../README.md#jwtAuth)
### HTTP request headers
- **Content-Type**: `application/json`, `text/plain`
- **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)
## estimateBracketRetrieve
> EstimateBracketResult estimateBracketRetrieve()
### Example
```ts
import {
Configuration,
EstimateBracketApi,
} from '';
import type { EstimateBracketRetrieveRequest } 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 EstimateBracketApi(config);
try {
const data = await api.estimateBracketRetrieve();
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
[**EstimateBracketResult**](EstimateBracketResult.md)
### 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)