regenerated service

This commit is contained in:
2026-06-25 19:12:33 +02:00
parent a7e4039342
commit 19af4e1abc
2 changed files with 23 additions and 11 deletions
-1
View File
@@ -139,5 +139,4 @@ async def get_work_by_identifier(
security.roles_allowed(["SUPER_ADMIN", "UNI_ADMIN"])
),
):
print("RUN SERVICE")
return await logic.get_work(identifier,title=title)
+23 -10
View File
@@ -619,14 +619,16 @@ export class WorksService extends BaseService {
}
/**
* Returns one publication.
* @endpoint get /api/works/detail/{work_id}
* @param workId The OpenAlex work id, for example W2741809807.
* Returns one publication by OpenAlex ID or DOI.
* @endpoint get /api/works/detail/{identifier}
* @param identifier The OpenAlex work id (e.g., W2741809807) or DOI number of the publication.
* @param title Do we want to fallback to title search if ID and DOI dont work?
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getWork(
workId: string,
identifier: string,
title?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
@@ -636,7 +638,8 @@ export class WorksService extends BaseService {
},
): Observable<Work>;
public getWork(
workId: string,
identifier: string,
title?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
@@ -646,7 +649,8 @@ export class WorksService extends BaseService {
},
): Observable<HttpResponse<Work>>;
public getWork(
workId: string,
identifier: string,
title?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
@@ -656,7 +660,8 @@ export class WorksService extends BaseService {
},
): Observable<HttpEvent<Work>>;
public getWork(
workId: string,
identifier: string,
title?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
@@ -665,12 +670,19 @@ export class WorksService extends BaseService {
transferCache?: boolean;
},
): Observable<any> {
if (workId === null || workId === undefined) {
if (identifier === null || identifier === undefined) {
throw new Error(
'Required parameter workId was null or undefined when calling getWork.',
'Required parameter identifier was null or undefined when calling getWork.',
);
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>title,
'title',
);
let localVarHeaders = this.defaultHeaders;
// authentication (bearer) required
@@ -709,10 +721,11 @@ export class WorksService extends BaseService {
}
}
let localVarPath = `/api/works/detail/${this.configuration.encodeParam({ name: 'workId', value: workId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
let localVarPath = `/api/works/detail/${this.configuration.encodeParam({ name: 'identifier', value: identifier, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Work>('get', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,