[mastodon] Generated openAPI routes for frontend
This commit is contained in:
parent
fb1e88ab03
commit
3d482dd5f5
|
@ -6,6 +6,7 @@ api/api.ts
|
|||
api/badwords.service.ts
|
||||
api/email.service.ts
|
||||
api/hoods.service.ts
|
||||
api/mastodon.service.ts
|
||||
api/telegram.service.ts
|
||||
api/test.service.ts
|
||||
api/triggers.service.ts
|
||||
|
@ -16,9 +17,9 @@ git_push.sh
|
|||
index.ts
|
||||
model/bodyAccessToken.ts
|
||||
model/bodyAdmin.ts
|
||||
model/bodyAdminLoginAdminLoginPost.ts
|
||||
model/bodyBadWord.ts
|
||||
model/bodyHood.ts
|
||||
model/bodyLogin.ts
|
||||
model/bodyPassword.ts
|
||||
model/bodySubscriber.ts
|
||||
model/bodyTelegram.ts
|
||||
|
|
|
@ -6,6 +6,7 @@ import { AdminService } from './api/admin.service';
|
|||
import { BadwordsService } from './api/badwords.service';
|
||||
import { EmailService } from './api/email.service';
|
||||
import { HoodsService } from './api/hoods.service';
|
||||
import { MastodonService } from './api/mastodon.service';
|
||||
import { TelegramService } from './api/telegram.service';
|
||||
import { TestService } from './api/test.service';
|
||||
import { TriggersService } from './api/triggers.service';
|
||||
|
|
|
@ -33,7 +33,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class AdminService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -136,7 +136,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/api/admin/confirm/${encodeURIComponent(String(registerToken))}`,
|
||||
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/admin/confirm/${encodeURIComponent(String(registerToken))}`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -195,7 +195,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/api/admin/reset/${encodeURIComponent(String(resetToken))}`,
|
||||
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/admin/reset/${encodeURIComponent(String(resetToken))}`,
|
||||
bodyPassword,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -243,7 +243,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/admin/`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/admin/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -292,7 +292,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/admin/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/admin/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -341,7 +341,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/admin/hoods/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/admin/hoods/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -429,7 +429,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/api/admin/login/`,
|
||||
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/admin/login/`,
|
||||
convertFormParamsToString ? formParams.toString() : formParams,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -485,7 +485,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/api/admin/register/`,
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/admin/register/`,
|
||||
bodyAdmin,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -541,7 +541,7 @@ export class AdminService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/api/admin/reset/`,
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/admin/reset/`,
|
||||
kibicaraWebapiAdminBodyEmail,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
|
|
@ -6,6 +6,8 @@ export * from './email.service';
|
|||
import { EmailService } from './email.service';
|
||||
export * from './hoods.service';
|
||||
import { HoodsService } from './hoods.service';
|
||||
export * from './mastodon.service';
|
||||
import { MastodonService } from './mastodon.service';
|
||||
export * from './telegram.service';
|
||||
import { TelegramService } from './telegram.service';
|
||||
export * from './test.service';
|
||||
|
@ -14,4 +16,4 @@ export * from './triggers.service';
|
|||
import { TriggersService } from './triggers.service';
|
||||
export * from './twitter.service';
|
||||
import { TwitterService } from './twitter.service';
|
||||
export const APIS = [AdminService, BadwordsService, EmailService, HoodsService, TelegramService, TestService, TriggersService, TwitterService];
|
||||
export const APIS = [AdminService, BadwordsService, EmailService, HoodsService, MastodonService, TelegramService, TestService, TriggersService, TwitterService];
|
||||
|
|
|
@ -30,7 +30,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class BadwordsService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -140,7 +140,7 @@ export class BadwordsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/`,
|
||||
bodyBadWord,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -198,7 +198,7 @@ export class BadwordsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -255,7 +255,7 @@ export class BadwordsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -308,7 +308,7 @@ export class BadwordsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -378,7 +378,7 @@ export class BadwordsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
|
||||
bodyBadWord,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
|
|
@ -32,7 +32,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class EmailService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -126,7 +126,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/subscribe/confirm/${encodeURIComponent(String(token))}`,
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/subscribe/confirm/${encodeURIComponent(String(token))}`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -193,7 +193,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/`,
|
||||
kibicaraPlatformsEmailWebapiBodyEmail,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -207,7 +207,7 @@ export class EmailService {
|
|||
|
||||
/**
|
||||
* Email Delete
|
||||
* Delete an Email bot. Stops and deletes the Email bot. :param hood: Hood the Email bot belongs to.
|
||||
* Delete an Email bot. Stops and deletes the Email bot. :param hood: Hood the Email bot belongs to.
|
||||
* @param emailId
|
||||
* @param hoodId
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
|
@ -251,7 +251,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/${encodeURIComponent(String(emailId))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/${encodeURIComponent(String(emailId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -307,7 +307,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/${encodeURIComponent(String(emailId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/${encodeURIComponent(String(emailId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -359,7 +359,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -404,7 +404,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/public`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/public`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -460,7 +460,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/subscribers/${encodeURIComponent(String(subscriberId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/subscribers/${encodeURIComponent(String(subscriberId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -512,7 +512,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/subscribers/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/subscribers/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -571,7 +571,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/messages/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/messages/`,
|
||||
kibicaraPlatformsEmailWebapiBodyMessage,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -624,7 +624,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/start`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/start`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -677,7 +677,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/status`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/status`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -729,7 +729,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/stop`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/stop`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -789,7 +789,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/subscribe/`,
|
||||
return this.httpClient.post<object>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/subscribe/`,
|
||||
bodySubscriber,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -840,7 +840,7 @@ export class EmailService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/unsubscribe/${encodeURIComponent(String(token))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/email/unsubscribe/${encodeURIComponent(String(token))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
|
|
@ -30,7 +30,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class HoodsService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -136,7 +136,7 @@ export class HoodsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/`,
|
||||
bodyHood,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -190,7 +190,7 @@ export class HoodsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -236,7 +236,7 @@ export class HoodsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -278,7 +278,7 @@ export class HoodsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -344,7 +344,7 @@ export class HoodsService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}`,
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}`,
|
||||
bodyHood,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
|
547
frontend/src/app/core/api/api/mastodon.service.ts
Normal file
547
frontend/src/app/core/api/api/mastodon.service.ts
Normal file
|
@ -0,0 +1,547 @@
|
|||
/**
|
||||
* FastAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
|
||||
import { CustomHttpParameterCodec } from '../encoder';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MastodonService {
|
||||
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
if (typeof this.configuration.basePath !== 'string') {
|
||||
if (typeof basePath !== 'string') {
|
||||
basePath = this.basePath;
|
||||
}
|
||||
this.configuration.basePath = basePath;
|
||||
}
|
||||
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
||||
}
|
||||
|
||||
|
||||
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
||||
if (typeof value === "object" && value instanceof Date === false) {
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
||||
} else {
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
||||
}
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
||||
if (value == null) {
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
if (typeof value === "object") {
|
||||
if (Array.isArray(value)) {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key,
|
||||
(value as Date).toISOString().substr(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
} else {
|
||||
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
|
||||
httpParams, value[k], key != null ? `${key}.${k}` : k));
|
||||
}
|
||||
} else if (key != null) {
|
||||
httpParams = httpParams.append(key, value);
|
||||
} else {
|
||||
throw Error("key may not be null if value is not object or array");
|
||||
}
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Create
|
||||
* Add a Mastodon Account to a Ticketfrei account. open questions: do we really get the username + password like this? can the instance_url have different ways of writing? :param: instance_url: the API base URL of the mastodon server :param: username: the username of the Mastodon account :param: password: the password of the Mastodon account :param: hood: the hood ORM object
|
||||
* @param hoodId
|
||||
* @param instanceUrl
|
||||
* @param username
|
||||
* @param password
|
||||
* @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 createMastodon(hoodId: number, instanceUrl: any, username: any, password: any, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public createMastodon(hoodId: number, instanceUrl: any, username: any, password: any, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public createMastodon(hoodId: number, instanceUrl: any, username: any, password: any, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public createMastodon(hoodId: number, instanceUrl: any, username: any, password: any, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling createMastodon.');
|
||||
}
|
||||
if (instanceUrl === null || instanceUrl === undefined) {
|
||||
throw new Error('Required parameter instanceUrl was null or undefined when calling createMastodon.');
|
||||
}
|
||||
if (username === null || username === undefined) {
|
||||
throw new Error('Required parameter username was null or undefined when calling createMastodon.');
|
||||
}
|
||||
if (password === null || password === undefined) {
|
||||
throw new Error('Required parameter password was null or undefined when calling createMastodon.');
|
||||
}
|
||||
|
||||
let queryParameters = new HttpParams({encoder: this.encoder});
|
||||
if (instanceUrl !== undefined && instanceUrl !== null) {
|
||||
queryParameters = this.addToHttpParams(queryParameters,
|
||||
<any>instanceUrl, 'instance_url');
|
||||
}
|
||||
if (username !== undefined && username !== null) {
|
||||
queryParameters = this.addToHttpParams(queryParameters,
|
||||
<any>username, 'username');
|
||||
}
|
||||
if (password !== undefined && password !== null) {
|
||||
queryParameters = this.addToHttpParams(queryParameters,
|
||||
<any>password, 'password');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let credential: string | undefined;
|
||||
// authentication (OAuth2PasswordBearer) required
|
||||
credential = this.configuration.lookupCredential('OAuth2PasswordBearer');
|
||||
if (credential) {
|
||||
headers = headers.set('Authorization', 'Bearer ' + credential);
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/`,
|
||||
null,
|
||||
{
|
||||
params: queryParameters,
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Delete
|
||||
* @param mastodonId
|
||||
* @param hoodId
|
||||
* @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 deleteMastodon(mastodonId: any, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public deleteMastodon(mastodonId: any, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public deleteMastodon(mastodonId: any, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public deleteMastodon(mastodonId: any, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (mastodonId === null || mastodonId === undefined) {
|
||||
throw new Error('Required parameter mastodonId was null or undefined when calling deleteMastodon.');
|
||||
}
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling deleteMastodon.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let credential: string | undefined;
|
||||
// authentication (OAuth2PasswordBearer) required
|
||||
credential = this.configuration.lookupCredential('OAuth2PasswordBearer');
|
||||
if (credential) {
|
||||
headers = headers.set('Authorization', 'Bearer ' + credential);
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/${encodeURIComponent(String(mastodonId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Read
|
||||
* @param mastodonId
|
||||
* @param hoodId
|
||||
* @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 getMastodon(mastodonId: any, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public getMastodon(mastodonId: any, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public getMastodon(mastodonId: any, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public getMastodon(mastodonId: any, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (mastodonId === null || mastodonId === undefined) {
|
||||
throw new Error('Required parameter mastodonId was null or undefined when calling getMastodon.');
|
||||
}
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling getMastodon.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let credential: string | undefined;
|
||||
// authentication (OAuth2PasswordBearer) required
|
||||
credential = this.configuration.lookupCredential('OAuth2PasswordBearer');
|
||||
if (credential) {
|
||||
headers = headers.set('Authorization', 'Bearer ' + credential);
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/${encodeURIComponent(String(mastodonId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Read All
|
||||
* @param hoodId
|
||||
* @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 getMastodons(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public getMastodons(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public getMastodons(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public getMastodons(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling getMastodons.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let credential: string | undefined;
|
||||
// authentication (OAuth2PasswordBearer) required
|
||||
credential = this.configuration.lookupCredential('OAuth2PasswordBearer');
|
||||
if (credential) {
|
||||
headers = headers.set('Authorization', 'Bearer ' + credential);
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Read All Public
|
||||
* @param hoodId
|
||||
* @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 getMastodonsPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public getMastodonsPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public getMastodonsPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public getMastodonsPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling getMastodonsPublic.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/public`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Start
|
||||
* @param mastodonId
|
||||
* @param hoodId
|
||||
* @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 startMastodon(mastodonId: any, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public startMastodon(mastodonId: any, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public startMastodon(mastodonId: any, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public startMastodon(mastodonId: any, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (mastodonId === null || mastodonId === undefined) {
|
||||
throw new Error('Required parameter mastodonId was null or undefined when calling startMastodon.');
|
||||
}
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling startMastodon.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let credential: string | undefined;
|
||||
// authentication (OAuth2PasswordBearer) required
|
||||
credential = this.configuration.lookupCredential('OAuth2PasswordBearer');
|
||||
if (credential) {
|
||||
headers = headers.set('Authorization', 'Bearer ' + credential);
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/${encodeURIComponent(String(mastodonId))}/start`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Status
|
||||
* @param mastodonId
|
||||
* @param hoodId
|
||||
* @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 statusMastodon(mastodonId: any, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public statusMastodon(mastodonId: any, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public statusMastodon(mastodonId: any, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public statusMastodon(mastodonId: any, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (mastodonId === null || mastodonId === undefined) {
|
||||
throw new Error('Required parameter mastodonId was null or undefined when calling statusMastodon.');
|
||||
}
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling statusMastodon.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let credential: string | undefined;
|
||||
// authentication (OAuth2PasswordBearer) required
|
||||
credential = this.configuration.lookupCredential('OAuth2PasswordBearer');
|
||||
if (credential) {
|
||||
headers = headers.set('Authorization', 'Bearer ' + credential);
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/${encodeURIComponent(String(mastodonId))}/status`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mastodon Stop
|
||||
* @param mastodonId
|
||||
* @param hoodId
|
||||
* @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 stopMastodon(mastodonId: any, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
|
||||
public stopMastodon(mastodonId: any, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
|
||||
public stopMastodon(mastodonId: any, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
|
||||
public stopMastodon(mastodonId: any, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
||||
if (mastodonId === null || mastodonId === undefined) {
|
||||
throw new Error('Required parameter mastodonId was null or undefined when calling stopMastodon.');
|
||||
}
|
||||
if (hoodId === null || hoodId === undefined) {
|
||||
throw new Error('Required parameter hoodId was null or undefined when calling stopMastodon.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
let credential: string | undefined;
|
||||
// authentication (OAuth2PasswordBearer) required
|
||||
credential = this.configuration.lookupCredential('OAuth2PasswordBearer');
|
||||
if (credential) {
|
||||
headers = headers.set('Authorization', 'Bearer ' + credential);
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
if (httpHeaderAcceptSelected === undefined) {
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
}
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
let responseType: 'text' | 'json' = 'json';
|
||||
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/mastodon/${encodeURIComponent(String(mastodonId))}/stop`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -30,7 +30,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class TelegramService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -139,7 +139,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/`,
|
||||
bodyTelegram,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -196,7 +196,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -252,7 +252,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -304,7 +304,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -349,7 +349,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/public`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/public`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -405,7 +405,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/start`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/start`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -462,7 +462,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/status`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/status`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -518,7 +518,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/stop`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/stop`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -588,7 +588,7 @@ export class TelegramService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
|
||||
bodyTelegram,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
|
|
@ -30,7 +30,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class TestService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -126,7 +126,7 @@ export class TestService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -183,7 +183,7 @@ export class TestService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -252,7 +252,7 @@ export class TestService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`,
|
||||
kibicaraPlatformsTestWebapiBodyMessage,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -309,7 +309,7 @@ export class TestService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -361,7 +361,7 @@ export class TestService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -417,7 +417,7 @@ export class TestService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
|
|
@ -30,7 +30,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class TriggersService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -140,7 +140,7 @@ export class TriggersService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/`,
|
||||
bodyTrigger,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -198,7 +198,7 @@ export class TriggersService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -255,7 +255,7 @@ export class TriggersService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -308,7 +308,7 @@ export class TriggersService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -378,7 +378,7 @@ export class TriggersService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
|
||||
return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
|
||||
bodyTrigger,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
|
|
@ -29,7 +29,7 @@ import { Configuration } from '../configurat
|
|||
})
|
||||
export class TwitterService {
|
||||
|
||||
protected basePath = 'http://localhost';
|
||||
protected basePath = 'http://localhost:8000/api';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
public encoder: HttpParameterCodec;
|
||||
|
@ -147,7 +147,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/twitter/callback`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/twitter/callback`,
|
||||
{
|
||||
params: queryParameters,
|
||||
responseType: <any>responseType,
|
||||
|
@ -201,7 +201,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -258,7 +258,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
|
||||
return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -314,7 +314,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -366,7 +366,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -411,7 +411,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/public`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/public`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -467,7 +467,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/start`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/start`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
@ -524,7 +524,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/status`,
|
||||
return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/status`,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
|
@ -580,7 +580,7 @@ export class TwitterService {
|
|||
responseType = 'text';
|
||||
}
|
||||
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/stop`,
|
||||
return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/stop`,
|
||||
null,
|
||||
{
|
||||
responseType: <any>responseType,
|
||||
|
|
22
frontend/src/app/core/api/model/bodyLogin.ts
Normal file
22
frontend/src/app/core/api/model/bodyLogin.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* FastAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* 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 BodyLogin {
|
||||
grant_type?: string;
|
||||
username: string;
|
||||
password: string;
|
||||
scope?: string;
|
||||
client_id?: string;
|
||||
client_secret?: string;
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
export * from './bodyAccessToken';
|
||||
export * from './bodyAdmin';
|
||||
export * from './bodyAdminLoginAdminLoginPost';
|
||||
export * from './bodyBadWord';
|
||||
export * from './bodyHood';
|
||||
export * from './bodyLogin';
|
||||
export * from './bodyPassword';
|
||||
export * from './bodySubscriber';
|
||||
export * from './bodyTelegram';
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
export interface ValidationError {
|
||||
loc: Array<string>;
|
||||
loc: Array<string | number>;
|
||||
msg: string;
|
||||
type: string;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue