@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
168 lines (117 loc) • 4.92 kB
Markdown
# FeaturesApi
All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**featuresList**](FeaturesApi.md#featureslist) | **GET** /features/ | |
| [**featuresRetrieve**](FeaturesApi.md#featuresretrieve) | **GET** /features/{id}/ | |
## featuresList
> PaginatedFeatureList featuresList(limit, offset, q, status)
### Example
```ts
import {
Configuration,
FeaturesApi,
} from '';
import type { FeaturesListRequest } 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 FeaturesApi(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,
// string | A search query. (optional)
q: q_example,
// Array<'C' | 'H' | 'HU' | 'PU' | 'S'> | Is this feature an utility for variant generation, a helper to be exploited somehow, or a standalone, probably impactful effect? (public utilities are visible to combo submitters) * `HU` - Hidden Utility * `PU` - Public Utility * `H` - Helper * `C` - Contextual * `S` - Standalone (optional)
status: ...,
} satisfies FeaturesListRequest;
try {
const data = await api.featuresList(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`] |
| **q** | `string` | A search query. | [Optional] [Defaults to `undefined`] |
| **status** | `C`, `H`, `HU`, `PU`, `S` | Is this feature an utility for variant generation, a helper to be exploited somehow, or a standalone, probably impactful effect? (public utilities are visible to combo submitters) * `HU` - Hidden Utility * `PU` - Public Utility * `H` - Helper * `C` - Contextual * `S` - Standalone | [Optional] [Enum: C, H, HU, PU, S] |
### Return type
[**PaginatedFeatureList**](PaginatedFeatureList.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)
## featuresRetrieve
> Feature featuresRetrieve(id)
### Example
```ts
import {
Configuration,
FeaturesApi,
} from '';
import type { FeaturesRetrieveRequest } 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 FeaturesApi(config);
const body = {
// number | A unique integer value identifying this feature.
id: 56,
} satisfies FeaturesRetrieveRequest;
try {
const data = await api.featuresRetrieve(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `number` | A unique integer value identifying this feature. | [Defaults to `undefined`] |
### Return type
[**Feature**](Feature.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)