@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
192 lines (141 loc) • 6.28 kB
Markdown
All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**findMyCombosCreate**](FindMyCombosApi.md
| [**findMyCombosList**](FindMyCombosApi.md
> PaginatedFindMyCombosResponseList findMyCombosCreate(groupByCombo, limit, offset, ordering, q, variant, deckRequest)
### Example
```ts
import {
Configuration,
FindMyCombosApi,
} from '';
import type { FindMyCombosCreateRequest } 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 FindMyCombosApi(config);
const body = {
// boolean | Group variants by combo (optional)
groupByCombo: true,
// number | Number of results to return per page. (optional)
limit: 56,
// number | The initial index from which to return the results. (optional)
offset: 56,
// string | Which field to use when ordering the results. (optional)
ordering: ordering_example,
// string | A search query. (optional)
q: q_example,
// string | Filters for variants of the same combos that generated the given variant id. (optional)
variant: variant_example,
// DeckRequest (optional)
deckRequest: ...,
} satisfies FindMyCombosCreateRequest;
try {
const data = await api.findMyCombosCreate(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **groupByCombo** | `boolean` | Group variants by combo | [Optional] [Defaults to `undefined`] |
| **limit** | `number` | Number of results to return per page. | [Optional] [Defaults to `undefined`] |
| **offset** | `number` | The initial index from which to return the results. | [Optional] [Defaults to `undefined`] |
| **ordering** | `string` | Which field to use when ordering the results. | [Optional] [Defaults to `undefined`] |
| **q** | `string` | A search query. | [Optional] [Defaults to `undefined`] |
| **variant** | `string` | Filters for variants of the same combos that generated the given variant id. | [Optional] [Defaults to `undefined`] |
| **deckRequest** | [DeckRequest](DeckRequest.md) | | [Optional] |
[**PaginatedFindMyCombosResponseList**](PaginatedFindMyCombosResponseList.md)
[](../README.md
- **Content-Type**: `application/json`, `text/plain`
- **Accept**: `application/json`
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |
[[Back to top]](
> PaginatedFindMyCombosResponseList findMyCombosList(groupByCombo, limit, offset, ordering, q, variant)
### Example
```ts
import {
Configuration,
FindMyCombosApi,
} from '';
import type { FindMyCombosListRequest } 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 FindMyCombosApi(config);
const body = {
// boolean | Group variants by combo (optional)
groupByCombo: true,
// number | Number of results to return per page. (optional)
limit: 56,
// number | The initial index from which to return the results. (optional)
offset: 56,
// string | Which field to use when ordering the results. (optional)
ordering: ordering_example,
// string | A search query. (optional)
q: q_example,
// string | Filters for variants of the same combos that generated the given variant id. (optional)
variant: variant_example,
} satisfies FindMyCombosListRequest;
try {
const data = await api.findMyCombosList(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **groupByCombo** | `boolean` | Group variants by combo | [Optional] [Defaults to `undefined`] |
| **limit** | `number` | Number of results to return per page. | [Optional] [Defaults to `undefined`] |
| **offset** | `number` | The initial index from which to return the results. | [Optional] [Defaults to `undefined`] |
| **ordering** | `string` | Which field to use when ordering the results. | [Optional] [Defaults to `undefined`] |
| **q** | `string` | A search query. | [Optional] [Defaults to `undefined`] |
| **variant** | `string` | Filters for variants of the same combos that generated the given variant id. | [Optional] [Defaults to `undefined`] |
[**PaginatedFindMyCombosResponseList**](PaginatedFindMyCombosResponseList.md)
[](../README.md
- **Content-Type**: Not defined
- **Accept**: `application/json`
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |
[[Back to top]](