feat: titles page
This commit is contained in:
parent
6836cfa057
commit
b976c35b8e
44 changed files with 1539 additions and 107 deletions
148
modules/frontend/src/api_/services/DefaultService.ts
Normal file
148
modules/frontend/src/api_/services/DefaultService.ts
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ReleaseSeason } from '../models/ReleaseSeason';
|
||||
import type { Title } from '../models/Title';
|
||||
import type { TitleStatus } from '../models/TitleStatus';
|
||||
import type { User } from '../models/User';
|
||||
import type { UserTitle } from '../models/UserTitle';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class DefaultService {
|
||||
/**
|
||||
* Get titles
|
||||
* @param word
|
||||
* @param status
|
||||
* @param rating
|
||||
* @param releaseYear
|
||||
* @param releaseSeason
|
||||
* @param limit
|
||||
* @param offset
|
||||
* @param fields
|
||||
* @returns Title List of titles
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getTitles(
|
||||
word?: string,
|
||||
status?: TitleStatus,
|
||||
rating?: number,
|
||||
releaseYear?: number,
|
||||
releaseSeason?: ReleaseSeason,
|
||||
limit: number = 10,
|
||||
offset?: number,
|
||||
fields: string = 'all',
|
||||
): CancelablePromise<Array<Title>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/titles',
|
||||
query: {
|
||||
'word': word,
|
||||
'status': status,
|
||||
'rating': rating,
|
||||
'release_year': releaseYear,
|
||||
'release_season': releaseSeason,
|
||||
'limit': limit,
|
||||
'offset': offset,
|
||||
'fields': fields,
|
||||
},
|
||||
errors: {
|
||||
400: `Request params are not correct`,
|
||||
500: `Unknown server error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get title description
|
||||
* @param titleId
|
||||
* @param fields
|
||||
* @returns Title Title description
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getTitles1(
|
||||
titleId: number,
|
||||
fields: string = 'all',
|
||||
): CancelablePromise<Title> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/titles/{title_id}',
|
||||
path: {
|
||||
'title_id': titleId,
|
||||
},
|
||||
query: {
|
||||
'fields': fields,
|
||||
},
|
||||
errors: {
|
||||
400: `Request params are not correct`,
|
||||
404: `Title not found`,
|
||||
500: `Unknown server error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get user info
|
||||
* @param userId
|
||||
* @param fields
|
||||
* @returns User User info
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getUsers(
|
||||
userId: string,
|
||||
fields: string = 'all',
|
||||
): CancelablePromise<User> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/users/{user_id}',
|
||||
path: {
|
||||
'user_id': userId,
|
||||
},
|
||||
query: {
|
||||
'fields': fields,
|
||||
},
|
||||
errors: {
|
||||
400: `Request params are not correct`,
|
||||
404: `User not found`,
|
||||
500: `Unknown server error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get user titles
|
||||
* @param userId
|
||||
* @param cursor
|
||||
* @param query
|
||||
* @param limit
|
||||
* @param offset
|
||||
* @param fields
|
||||
* @returns UserTitle List of user titles
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getUsersTitles(
|
||||
userId: string,
|
||||
cursor?: string,
|
||||
query?: string,
|
||||
limit: number = 10,
|
||||
offset?: number,
|
||||
fields: string = 'all',
|
||||
): CancelablePromise<Array<UserTitle>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/users/{user_id}/titles',
|
||||
path: {
|
||||
'user_id': userId,
|
||||
},
|
||||
query: {
|
||||
'cursor': cursor,
|
||||
'query': query,
|
||||
'limit': limit,
|
||||
'offset': offset,
|
||||
'fields': fields,
|
||||
},
|
||||
errors: {
|
||||
400: `Request params are not correct`,
|
||||
500: `Unknown server error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue