@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
162 lines (111 loc) • 4.08 kB
Markdown
# VariantAliasesApi
All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**variantAliasesList**](VariantAliasesApi.md#variantaliaseslist) | **GET** /variant-aliases/ | |
| [**variantAliasesRetrieve**](VariantAliasesApi.md#variantaliasesretrieve) | **GET** /variant-aliases/{id}/ | |
## variantAliasesList
> PaginatedVariantAliasList variantAliasesList(limit, offset)
### Example
```ts
import {
Configuration,
VariantAliasesApi,
} from '';
import type { VariantAliasesListRequest } 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 VariantAliasesApi(config);
const body = {
// number | Number of results to return per page. (optional)
limit: 56,
// number | The initial index from which to return the results. (optional)
offset: 56,
} satisfies VariantAliasesListRequest;
try {
const data = await api.variantAliasesList(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **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`] |
### Return type
[**PaginatedVariantAliasList**](PaginatedVariantAliasList.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)
## variantAliasesRetrieve
> VariantAlias variantAliasesRetrieve(id)
### Example
```ts
import {
Configuration,
VariantAliasesApi,
} from '';
import type { VariantAliasesRetrieveRequest } 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 VariantAliasesApi(config);
const body = {
// string
id: id_example,
} satisfies VariantAliasesRetrieveRequest;
try {
const data = await api.variantAliasesRetrieve(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` | | [Defaults to `undefined`] |
### Return type
[**VariantAlias**](VariantAlias.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)