Skip to content

Commit

Permalink
update swagger (beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrosack committed Jun 16, 2023
1 parent 516e826 commit c8fc04f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion projects/pydt-shared-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "pydt-shared",
"version": "1.8.4"
"version": "1.8.5-beta4"
}
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,58 @@ export class GameService {
);
}

/**
*
*
* @param gameId
* @param turn
* @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 getTurnById(gameId: string, turn: number, observe?: 'body', reportProgress?: boolean): Observable<GameTurnResponse>;
public getTurnById(gameId: string, turn: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<GameTurnResponse>>;
public getTurnById(gameId: string, turn: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<GameTurnResponse>>;
public getTurnById(gameId: string, turn: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {

if (gameId === null || gameId === undefined) {
throw new Error('Required parameter gameId was null or undefined when calling getTurnById.');
}

if (turn === null || turn === undefined) {
throw new Error('Required parameter turn was null or undefined when calling getTurnById.');
}

let headers = this.defaultHeaders;

// authentication (api_key) required
if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) {
headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]);
}

// to determine the Accept header
let httpHeaderAccepts: string[] = [
'application/json'
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}

// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];

return this.httpClient.get<GameTurnResponse>(`${this.basePath}/game/${encodeURIComponent(String(gameId))}/turn/${encodeURIComponent(String(turn))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}

/**
*
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export interface Game {
latestDiscoursePostUser?: string;
lastTurnEndDate?: Date;
resetGameStateOnNextUpload?: boolean;
finalized?: boolean;
gameVideoUrl?: string;
}
export namespace Game {
export type RandomOnlyEnum = 'EITHER' | 'FORCE_RANDOM' | 'FORCE_LEADER';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ export interface PrivateUserData {
newGameEmailsWithPasswords?: boolean;
newGameEmailTypes?: Array<string>;
newGameEmailFilter?: string;
lastTurnIpAddress?: string;
}

0 comments on commit c8fc04f

Please sign in to comment.