@tennac-booking/sdk
Version:
OpenAPI client for @tennac-booking/sdk
433 lines (279 loc) • 10.5 kB
Markdown
# ClubsApi
All URIs are relative to *https://api.mon-domaine.com*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addClubMember**](#addclubmember) | **PUT** /api/clubs/{id}/add_members | Ajouter un membre à un club|
|[**createClub**](#createclub) | **POST** /api/clubs | Créer un nouveau club|
|[**deleteClub**](#deleteclub) | **DELETE** /api/clubs/{id} | Supprimer un club|
|[**getAllClubs**](#getallclubs) | **GET** /api/clubs | Récupérer tous les clubs|
|[**getClubInfo**](#getclubinfo) | **GET** /api/clubs/{id} | Récupérer les informations d\'un club|
|[**getClubMembers**](#getclubmembers) | **GET** /api/clubs/{id}/members | Récupérer les membres d\'un club|
|[**getClubRoles**](#getclubroles) | **GET** /api/clubs/{id}/roles | Récupérer les rôles d\'un club|
|[**updateClub**](#updateclub) | **PUT** /api/clubs/{id} | Mettre à jour un club existant|
# **addClubMember**
> AddClubMemberResponse addClubMember(addClubMemberRequest)
### Example
```typescript
import {
ClubsApi,
Configuration,
AddClubMemberRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; //ID du club (default to undefined)
let addClubMemberRequest: AddClubMemberRequest; //
const { status, data } = await apiInstance.addClubMember(
id,
addClubMemberRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **addClubMemberRequest** | **AddClubMemberRequest**| | |
| **id** | [**string**] | ID du club | defaults to undefined|
### Return type
**AddClubMemberResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Membre ajouté avec succès | - |
|**400** | Requête invalide | - |
|**404** | Ressource non trouvée | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **createClub**
> ClubResponse createClub(createClubRequest)
### Example
```typescript
import {
ClubsApi,
Configuration,
CreateClubRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let createClubRequest: CreateClubRequest; //
const { status, data } = await apiInstance.createClub(
createClubRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **createClubRequest** | **CreateClubRequest**| | |
### Return type
**ClubResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Club créé avec succès | - |
|**400** | Requête invalide | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **deleteClub**
> DeleteClub200Response deleteClub()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; //ID du club (default to undefined)
const { status, data } = await apiInstance.deleteClub(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
### Return type
**DeleteClub200Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Club supprimé avec succès | - |
|**404** | Ressource non trouvée | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAllClubs**
> ClubListResponse getAllClubs()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
const { status, data } = await apiInstance.getAllClubs();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**ClubListResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Liste des clubs | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getClubInfo**
> ClubInfoResponse getClubInfo()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; //ID du club (default to undefined)
const { status, data } = await apiInstance.getClubInfo(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
### Return type
**ClubInfoResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Informations du club | - |
|**404** | Ressource non trouvée | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getClubMembers**
> ClubMembersResponse getClubMembers()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; //ID du club (default to undefined)
const { status, data } = await apiInstance.getClubMembers(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
### Return type
**ClubMembersResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Liste des membres du club | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getClubRoles**
> ClubRolesResponse getClubRoles()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; //ID du club (default to undefined)
const { status, data } = await apiInstance.getClubRoles(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
### Return type
**ClubRolesResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Liste des rôles du club | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateClub**
> ClubResponse updateClub(updateClubRequest)
### Example
```typescript
import {
ClubsApi,
Configuration,
UpdateClubRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; //ID du club (default to undefined)
let updateClubRequest: UpdateClubRequest; //
const { status, data } = await apiInstance.updateClub(
id,
updateClubRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **updateClubRequest** | **UpdateClubRequest**| | |
| **id** | [**string**] | ID du club | defaults to undefined|
### Return type
**ClubResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Club mis à jour avec succès | - |
|**400** | Requête invalide | - |
|**404** | Ressource non trouvée | - |
|**500** | Erreur serveur interne | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)