-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
352 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* EduLint web API | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* OpenAPI spec version: 1.0.0 | ||
* OpenAPI spec version: 1.0.1 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by the swagger code generator program. | ||
|
@@ -17,11 +17,13 @@ import { CustomHttpUrlEncodingCodec } from '../encoder'; | |
|
||
import { Observable } from 'rxjs'; | ||
|
||
import { Code } from '../model/code'; | ||
import { AnalyzeResponse } from '../model/analyzeResponse'; | ||
import { CodeFile } from '../model/codeFile'; | ||
import { CodeRequest } from '../model/codeRequest'; | ||
import { Hash } from '../model/hash'; | ||
import { HashStr } from '../model/hashStr'; | ||
import { Problems } from '../model/problems'; | ||
import { QueryConfig } from '../model/queryConfig'; | ||
import { TrueBoolean } from '../model/trueBoolean'; | ||
|
||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; | ||
import { Configuration } from '../configuration'; | ||
|
@@ -30,7 +32,7 @@ import { Configuration } from '../configurat | |
@Injectable() | ||
export class APIService { | ||
|
||
protected basePath = ''; | ||
protected basePath = 'https://edulint.com'; | ||
public defaultHeaders = new HttpHeaders(); | ||
public configuration = new Configuration(); | ||
|
||
|
@@ -62,15 +64,17 @@ export class APIService { | |
/** | ||
* Analyzes the code with the given hash with the given version of EduLint | ||
* | ||
* @param version the version of EduLint to use | ||
* @param version The version of EduLint to use. You can use either a specific version (e.g. 2.0.0) or \"latest\". | ||
* @param hash the hash of the code to analyze | ||
* @param config extra configuration to use (equivalent to command line configuration described in [EduLint's documentation](https://edulint.rtfd.io#configuration)). | ||
* @param use_cached_result enables/disables using cached linting results | ||
* @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 analyzeUploaded(version: string, hash: HashStr, observe?: 'body', reportProgress?: boolean): Observable<Problems>; | ||
public analyzeUploaded(version: string, hash: HashStr, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Problems>>; | ||
public analyzeUploaded(version: string, hash: HashStr, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Problems>>; | ||
public analyzeUploaded(version: string, hash: HashStr, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { | ||
public analyzeUploaded(version: string, hash: HashStr, config?: QueryConfig, use_cached_result?: TrueBoolean, observe?: 'body', reportProgress?: boolean): Observable<AnalyzeResponse>; | ||
public analyzeUploaded(version: string, hash: HashStr, config?: QueryConfig, use_cached_result?: TrueBoolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<AnalyzeResponse>>; | ||
public analyzeUploaded(version: string, hash: HashStr, config?: QueryConfig, use_cached_result?: TrueBoolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<AnalyzeResponse>>; | ||
public analyzeUploaded(version: string, hash: HashStr, config?: QueryConfig, use_cached_result?: TrueBoolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { | ||
|
||
if (version === null || version === undefined) { | ||
throw new Error('Required parameter version was null or undefined when calling analyzeUploaded.'); | ||
|
@@ -80,6 +84,16 @@ export class APIService { | |
throw new Error('Required parameter hash was null or undefined when calling analyzeUploaded.'); | ||
} | ||
|
||
|
||
|
||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); | ||
if (config !== undefined && config !== null) { | ||
queryParameters = queryParameters.set('config', <any>config); | ||
} | ||
if (use_cached_result !== undefined && use_cached_result !== null) { | ||
queryParameters = queryParameters.set('use-cached-result', <any>use_cached_result); | ||
} | ||
|
||
let headers = this.defaultHeaders; | ||
|
||
// to determine the Accept header | ||
|
@@ -95,8 +109,9 @@ export class APIService { | |
const consumes: string[] = [ | ||
]; | ||
|
||
return this.httpClient.request<Problems>('get',`${this.basePath}/api/${encodeURIComponent(String(version))}/analyze/${encodeURIComponent(String(hash))}`, | ||
return this.httpClient.request<AnalyzeResponse>('get',`${this.basePath}/api/${encodeURIComponent(String(version))}/analyze/${encodeURIComponent(String(hash))}`, | ||
{ | ||
params: queryParameters, | ||
withCredentials: this.configuration.withCredentials, | ||
headers: headers, | ||
observe: observe, | ||
|
@@ -149,14 +164,14 @@ export class APIService { | |
/** | ||
* Uploads some code | ||
* | ||
* @param body the code to upload | ||
* @param body information on the code to upload | ||
* @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 apiCodePost(body: Code, observe?: 'body', reportProgress?: boolean): Observable<Hash>; | ||
public apiCodePost(body: Code, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Hash>>; | ||
public apiCodePost(body: Code, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Hash>>; | ||
public apiCodePost(body: Code, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { | ||
public apiCodePost(body: CodeRequest, observe?: 'body', reportProgress?: boolean): Observable<Hash>; | ||
public apiCodePost(body: CodeRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Hash>>; | ||
public apiCodePost(body: CodeRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Hash>>; | ||
public apiCodePost(body: CodeRequest, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { | ||
|
||
if (body === null || body === undefined) { | ||
throw new Error('Required parameter body was null or undefined when calling apiCodePost.'); | ||
|
@@ -197,14 +212,16 @@ export class APIService { | |
* Uploads some code and returns its analysis | ||
* This endpoint combines the /code and /api/{version}/analyze/{hash} endpoints. | ||
* @param body the code to upload and analyze | ||
* @param version the version of EduLint to use | ||
* @param version The version of EduLint to use. You can use either a specific version (e.g. 2.0.0) or \"latest\". | ||
* @param config extra configuration to use (equivalent to command line configuration described in [EduLint's documentation](https://edulint.rtfd.io#configuration)). | ||
* @param use_cached_result enables/disables using cached linting results | ||
* @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 apiVersionAnalyzePost(body: Code, version: string, observe?: 'body', reportProgress?: boolean): Observable<Problems>; | ||
public apiVersionAnalyzePost(body: Code, version: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Problems>>; | ||
public apiVersionAnalyzePost(body: Code, version: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Problems>>; | ||
public apiVersionAnalyzePost(body: Code, version: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { | ||
public apiVersionAnalyzePost(body: CodeRequest, version: string, config?: QueryConfig, use_cached_result?: TrueBoolean, observe?: 'body', reportProgress?: boolean): Observable<AnalyzeResponse>; | ||
public apiVersionAnalyzePost(body: CodeRequest, version: string, config?: QueryConfig, use_cached_result?: TrueBoolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<AnalyzeResponse>>; | ||
public apiVersionAnalyzePost(body: CodeRequest, version: string, config?: QueryConfig, use_cached_result?: TrueBoolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<AnalyzeResponse>>; | ||
public apiVersionAnalyzePost(body: CodeRequest, version: string, config?: QueryConfig, use_cached_result?: TrueBoolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { | ||
|
||
if (body === null || body === undefined) { | ||
throw new Error('Required parameter body was null or undefined when calling apiVersionAnalyzePost.'); | ||
|
@@ -214,6 +231,16 @@ export class APIService { | |
throw new Error('Required parameter version was null or undefined when calling apiVersionAnalyzePost.'); | ||
} | ||
|
||
|
||
|
||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); | ||
if (config !== undefined && config !== null) { | ||
queryParameters = queryParameters.set('config', <any>config); | ||
} | ||
if (use_cached_result !== undefined && use_cached_result !== null) { | ||
queryParameters = queryParameters.set('use-cached-result', <any>use_cached_result); | ||
} | ||
|
||
let headers = this.defaultHeaders; | ||
|
||
// to determine the Accept header | ||
|
@@ -234,9 +261,10 @@ export class APIService { | |
headers = headers.set('Content-Type', httpContentTypeSelected); | ||
} | ||
|
||
return this.httpClient.request<Problems>('post',`${this.basePath}/api/${encodeURIComponent(String(version))}/analyze`, | ||
return this.httpClient.request<AnalyzeResponse>('post',`${this.basePath}/api/${encodeURIComponent(String(version))}/analyze`, | ||
{ | ||
body: body, | ||
params: queryParameters, | ||
withCredentials: this.configuration.withCredentials, | ||
headers: headers, | ||
observe: observe, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export * from './aPI.service'; | ||
import { APIService } from './aPI.service'; | ||
export * from './default.service'; | ||
import { DefaultService } from './default.service'; | ||
export * from './web.service'; | ||
import { WebService } from './web.service'; | ||
export const APIS = [APIService, WebService]; | ||
export const APIS = [APIService, DefaultService, WebService]; |
Oops, something went wrong.