| 45 | } from './types.gen' |
| 46 | |
| 47 | export class FlashcardsService { |
| 48 | /** |
| 49 | * Read Collections |
| 50 | * @param data The data for the request. |
| 51 | * @param data.skip |
| 52 | * @param data.limit |
| 53 | * @returns CollectionList Successful Response |
| 54 | * @throws ApiError |
| 55 | */ |
| 56 | public static readCollections( |
| 57 | data: FlashcardsReadCollectionsData = {}, |
| 58 | ): CancelablePromise<FlashcardsReadCollectionsResponse> { |
| 59 | return __request(OpenAPI, { |
| 60 | method: 'GET', |
| 61 | url: '/api/v1/collections/', |
| 62 | query: { |
| 63 | skip: data.skip, |
| 64 | limit: data.limit, |
| 65 | }, |
| 66 | errors: { |
| 67 | 422: 'Validation Error', |
| 68 | }, |
| 69 | }) |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Create Collection |
| 74 | * @param data The data for the request. |
| 75 | * @param data.requestBody |
| 76 | * @returns Collection Successful Response |
| 77 | * @throws ApiError |
| 78 | */ |
| 79 | public static createCollection( |
| 80 | data: FlashcardsCreateCollectionData, |
| 81 | ): CancelablePromise<FlashcardsCreateCollectionResponse> { |
| 82 | return __request(OpenAPI, { |
| 83 | method: 'POST', |
| 84 | url: '/api/v1/collections/', |
| 85 | body: data.requestBody, |
| 86 | mediaType: 'application/json', |
| 87 | errors: { |
| 88 | 422: 'Validation Error', |
| 89 | }, |
| 90 | }) |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Read Collection |
| 95 | * @param data The data for the request. |
| 96 | * @param data.collectionId |
| 97 | * @returns Collection Successful Response |
| 98 | * @throws ApiError |
| 99 | */ |
| 100 | public static readCollection( |
| 101 | data: FlashcardsReadCollectionData, |
| 102 | ): CancelablePromise<FlashcardsReadCollectionResponse> { |
| 103 | return __request(OpenAPI, { |
| 104 | method: 'GET', |
nothing calls this directly
no outgoing calls
no test coverage detected