load research timeline via generated works API
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -53,6 +53,9 @@ model/models.ts
|
||||
model/openAccess.ts
|
||||
model/personBio.ts
|
||||
model/score.ts
|
||||
model/topicCount.ts
|
||||
model/topicsByTime.ts
|
||||
model/topicsByYear.ts
|
||||
model/validationError.ts
|
||||
model/validationErrorLocInner.ts
|
||||
model/value.ts
|
||||
|
||||
@@ -19,6 +19,8 @@ import { Observable } from 'rxjs';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
// @ts-ignore
|
||||
import { TopicsByTime } from '../model/topicsByTime';
|
||||
// @ts-ignore
|
||||
import { WorkPage } from '../model/workPage';
|
||||
// @ts-ignore
|
||||
import { WorksListResponse } from '../model/worksListResponse';
|
||||
@@ -185,4 +187,68 @@ export class WorksService extends BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns topics grouped by publication year for an author.
|
||||
* @endpoint get /api/works/{author_id}/topics-by-time
|
||||
* @param authorId The author id, for example A5023888391.
|
||||
* @param maxTopicsPerYear The maximum number of topics per year.
|
||||
* @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 getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<TopicsByTime>;
|
||||
public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TopicsByTime>>;
|
||||
public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TopicsByTime>>;
|
||||
public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (authorId === null || authorId === undefined) {
|
||||
throw new Error('Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.');
|
||||
}
|
||||
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>maxTopicsPerYear, 'max_topics_per_year');
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/topics-by-time`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<TopicsByTime>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ export * from './model2YrMeanCitedness';
|
||||
export * from './openAccess';
|
||||
export * from './personBio';
|
||||
export * from './score';
|
||||
export * from './topicCount';
|
||||
export * from './topicsByTime';
|
||||
export * from './topicsByYear';
|
||||
export * from './validationError';
|
||||
export * from './validationErrorLocInner';
|
||||
export * from './value';
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface TopicCount {
|
||||
/**
|
||||
* The topic display name.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The number of occurrences.
|
||||
*/
|
||||
count?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { TopicsByYear } from './topicsByYear';
|
||||
|
||||
|
||||
export interface TopicsByTime {
|
||||
/**
|
||||
* Topics grouped by year.
|
||||
*/
|
||||
elements?: Array<TopicsByYear>;
|
||||
/**
|
||||
* The number of years.
|
||||
*/
|
||||
total?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { TopicCount } from './topicCount';
|
||||
|
||||
|
||||
export interface TopicsByYear {
|
||||
/**
|
||||
* The publication year.
|
||||
*/
|
||||
year: number;
|
||||
/**
|
||||
* The number of works in this year.
|
||||
*/
|
||||
publication_count?: number;
|
||||
/**
|
||||
* The topics in this year.
|
||||
*/
|
||||
topics?: Array<TopicCount>;
|
||||
/**
|
||||
* The primary topics in this year.
|
||||
*/
|
||||
primary_topics?: Array<TopicCount>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user