@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
151 lines (102 loc) • 3.52 kB
Markdown
# CardListFromTextApi
All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**cardListFromTextCreate**](CardListFromTextApi.md#cardlistfromtextcreate) | **POST** /card-list-from-text | |
| [**cardListFromTextRetrieve**](CardListFromTextApi.md#cardlistfromtextretrieve) | **GET** /card-list-from-text | |
## cardListFromTextCreate
> Deck cardListFromTextCreate(body)
### Example
```ts
import {
Configuration,
CardListFromTextApi,
} from '';
import type { CardListFromTextCreateRequest } 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 CardListFromTextApi(config);
const body = {
// string (optional)
body: body_example,
} satisfies CardListFromTextCreateRequest;
try {
const data = await api.cardListFromTextCreate(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | `string` | | [Optional] |
### Return type
[**Deck**](Deck.md)
### Authorization
[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [jwtAuth](../README.md#jwtAuth)
### HTTP request headers
- **Content-Type**: `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)
## cardListFromTextRetrieve
> Deck cardListFromTextRetrieve()
### Example
```ts
import {
Configuration,
CardListFromTextApi,
} from '';
import type { CardListFromTextRetrieveRequest } 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 CardListFromTextApi(config);
try {
const data = await api.cardListFromTextRetrieve();
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
[**Deck**](Deck.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)