@tennac-booking/sdk
Version:
OpenAPI client for @tennac-booking/sdk
301 lines (202 loc) • 8.71 kB
Markdown
# ClubSlotsApi
All URIs are relative to *https://api.mon-domaine.com*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteSlotsByClubInRange**](#deleteslotsbyclubinrange) | **DELETE** /api/clubs/{id}/slots | Supprimer des créneaux pour un club sur une plage de dates|
|[**generateSlotsForNextThreeWeeks**](#generateslotsfornextthreeweeks) | **POST** /api/clubs/{id}/generate-slots | Générer les créneaux pour les 3 semaines à venir|
|[**getAvailableSlotsBySports**](#getavailableslotsbysports) | **GET** /api/clubs/{id}/sports/{sportId}/slots | Obtenir tous les slots disponibles pour un sport dans un club|
|[**getAvailableSlotsBySportsAndDay**](#getavailableslotsbysportsandday) | **GET** /api/clubs/{id}/sports/{sportId}/slots/{day} | Obtenir les slots disponibles pour un jour donné|
|[**getSlotsByClub**](#getslotsbyclub) | **GET** /api/clubs/{id}/slots | Récupérer tous les créneaux pour un club|
# **deleteSlotsByClubInRange**
> DeleteSlotsByClubInRange200Response deleteSlotsByClubInRange()
### Example
```typescript
import {
ClubSlotsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubSlotsApi(configuration);
let id: string; //ID du club (default to undefined)
let start: string; //Date de début (format ISO) (default to undefined)
let end: string; //Date de fin (format ISO) (default to undefined)
const { status, data } = await apiInstance.deleteSlotsByClubInRange(
id,
start,
end
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
| **start** | [**string**] | Date de début (format ISO) | defaults to undefined|
| **end** | [**string**] | Date de fin (format ISO) | defaults to undefined|
### Return type
**DeleteSlotsByClubInRange200Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Créneaux supprimés 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)
# **generateSlotsForNextThreeWeeks**
> GenerateSlotsForNextThreeWeeks201Response generateSlotsForNextThreeWeeks()
### Example
```typescript
import {
ClubSlotsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubSlotsApi(configuration);
let id: string; //ID du club (default to undefined)
const { status, data } = await apiInstance.generateSlotsForNextThreeWeeks(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
### Return type
**GenerateSlotsForNextThreeWeeks201Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Créneaux générés 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)
# **getAvailableSlotsBySports**
> SlotsResponse getAvailableSlotsBySports()
### Example
```typescript
import {
ClubSlotsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubSlotsApi(configuration);
let id: string; //ID du club (default to undefined)
let sportId: string; //ID du sport (default to undefined)
let start: string; //Date de début (format ISO) (optional) (default to undefined)
let end: string; //Date de fin (format ISO) (optional) (default to undefined)
const { status, data } = await apiInstance.getAvailableSlotsBySports(
id,
sportId,
start,
end
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
| **sportId** | [**string**] | ID du sport | defaults to undefined|
| **start** | [**string**] | Date de début (format ISO) | (optional) defaults to undefined|
| **end** | [**string**] | Date de fin (format ISO) | (optional) defaults to undefined|
### Return type
**SlotsResponse**
### 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 créneaux disponibles | - |
|**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)
# **getAvailableSlotsBySportsAndDay**
> SlotsResponse getAvailableSlotsBySportsAndDay()
### Example
```typescript
import {
ClubSlotsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubSlotsApi(configuration);
let id: string; //ID du club (default to undefined)
let sportId: string; //ID du sport (default to undefined)
let day: string; //Date du jour (format YYYY-MM-DD) (default to undefined)
const { status, data } = await apiInstance.getAvailableSlotsBySportsAndDay(
id,
sportId,
day
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
| **sportId** | [**string**] | ID du sport | defaults to undefined|
| **day** | [**string**] | Date du jour (format YYYY-MM-DD) | defaults to undefined|
### Return type
**SlotsResponse**
### 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 créneaux disponibles pour le jour donné | - |
|**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)
# **getSlotsByClub**
> SlotsResponse getSlotsByClub()
### Example
```typescript
import {
ClubSlotsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubSlotsApi(configuration);
let id: string; //ID du club (default to undefined)
let start: string; //Date de début (format ISO) (optional) (default to undefined)
let end: string; //Date de fin (format ISO) (optional) (default to undefined)
const { status, data } = await apiInstance.getSlotsByClub(
id,
start,
end
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | ID du club | defaults to undefined|
| **start** | [**string**] | Date de début (format ISO) | (optional) defaults to undefined|
| **end** | [**string**] | Date de fin (format ISO) | (optional) defaults to undefined|
### Return type
**SlotsResponse**
### 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 créneaux du club | - |
|**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)