From 3546092a566bbe88038a78a8328ca96339bb2d16 Mon Sep 17 00:00:00 2001
From: missytake
Date: Sat, 18 Mar 2023 17:02:57 +0100
Subject: [PATCH] [misc] Remove twitter from frontend
---
frontend/src/app/core/api/api.module.ts | 1 -
frontend/src/app/core/api/api/api.ts | 4 +-
.../src/app/core/api/api/twitter.service.ts | 595 ------------------
.../board/hoodpage/hoodpage.component.html | 4 +-
.../board/platforms/platforms.component.html | 1 -
.../app/dashboard/dashboard-routing.module.ts | 3 -
.../platforms-info-page.component.html | 1 -
.../src/app/platforms/platforms.module.ts | 13 -
.../twitter-bot-card.component.html | 46 --
.../twitter-bot-card.component.scss | 11 -
.../twitter-bot-card.component.spec.ts | 24 -
.../twitter-bot-card.component.ts | 27 -
.../twitter-bot-info-dialog.component.html | 51 --
.../twitter-bot-info-dialog.component.scss | 4 -
.../twitter-bot-info-dialog.component.ts | 12 -
.../twitter-callback.component.html | 3 -
.../twitter-callback.component.scss | 4 -
.../twitter-callback.component.spec.ts | 24 -
.../twitter-callback.component.ts | 47 --
.../twitter-corpses.pipe.ts | 10 -
.../twitter-info-dialog.component.html | 41 --
.../twitter-info-dialog.component.scss | 9 -
.../twitter-info-dialog.component.ts | 12 -
.../twitter-settings.component.html | 64 --
.../twitter-settings.component.scss | 22 -
.../twitter-settings.component.spec.ts | 24 -
.../twitter-settings.component.ts | 77 ---
.../homepage/faq/faq.component.html | 11 -
.../homepage/homepage.component.html | 4 +-
29 files changed, 5 insertions(+), 1144 deletions(-)
delete mode 100644 frontend/src/app/core/api/api/twitter.service.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.html
delete mode 100644 frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.scss
delete mode 100644 frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.spec.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.html
delete mode 100644 frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.scss
delete mode 100644 frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-callback/twitter-callback.component.html
delete mode 100644 frontend/src/app/platforms/twitter/twitter-callback/twitter-callback.component.scss
delete mode 100644 frontend/src/app/platforms/twitter/twitter-callback/twitter-callback.component.spec.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-callback/twitter-callback.component.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-corpses-pipe/twitter-corpses.pipe.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-settings/twitter-info-dialog/twitter-info-dialog.component.html
delete mode 100644 frontend/src/app/platforms/twitter/twitter-settings/twitter-info-dialog/twitter-info-dialog.component.scss
delete mode 100644 frontend/src/app/platforms/twitter/twitter-settings/twitter-info-dialog/twitter-info-dialog.component.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-settings/twitter-settings.component.html
delete mode 100644 frontend/src/app/platforms/twitter/twitter-settings/twitter-settings.component.scss
delete mode 100644 frontend/src/app/platforms/twitter/twitter-settings/twitter-settings.component.spec.ts
delete mode 100644 frontend/src/app/platforms/twitter/twitter-settings/twitter-settings.component.ts
diff --git a/frontend/src/app/core/api/api.module.ts b/frontend/src/app/core/api/api.module.ts
index 606119d..9647f7c 100644
--- a/frontend/src/app/core/api/api.module.ts
+++ b/frontend/src/app/core/api/api.module.ts
@@ -9,7 +9,6 @@ import { HoodsService } from './api/hoods.service';
import { TelegramService } from './api/telegram.service';
import { TestService } from './api/test.service';
import { TriggersService } from './api/triggers.service';
-import { TwitterService } from './api/twitter.service';
@NgModule({
imports: [],
diff --git a/frontend/src/app/core/api/api/api.ts b/frontend/src/app/core/api/api/api.ts
index b9c2089..5c9df07 100644
--- a/frontend/src/app/core/api/api/api.ts
+++ b/frontend/src/app/core/api/api/api.ts
@@ -12,6 +12,4 @@ export * from './test.service';
import { TestService } from './test.service';
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, TelegramService, TestService, TriggersService];
diff --git a/frontend/src/app/core/api/api/twitter.service.ts b/frontend/src/app/core/api/api/twitter.service.ts
deleted file mode 100644
index e91fb01..0000000
--- a/frontend/src/app/core/api/api/twitter.service.ts
+++ /dev/null
@@ -1,595 +0,0 @@
-/**
- * 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 TwitterService {
-
- protected basePath = 'http://localhost';
- 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;
- }
-
- /**
- * Twitter Read Callback
- * @param oauthToken
- * @param oauthVerifier
- * @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 callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (oauthToken === null || oauthToken === undefined) {
- throw new Error('Required parameter oauthToken was null or undefined when calling callbackTwitter.');
- }
- if (oauthVerifier === null || oauthVerifier === undefined) {
- throw new Error('Required parameter oauthVerifier was null or undefined when calling callbackTwitter.');
- }
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling callbackTwitter.');
- }
-
- let queryParameters = new HttpParams({encoder: this.encoder});
- if (oauthToken !== undefined && oauthToken !== null) {
- queryParameters = this.addToHttpParams(queryParameters,
- oauthToken, 'oauth_token');
- }
- if (oauthVerifier !== undefined && oauthVerifier !== null) {
- queryParameters = this.addToHttpParams(queryParameters,
- oauthVerifier, 'oauth_verifier');
- }
- if (hoodId !== undefined && hoodId !== null) {
- queryParameters = this.addToHttpParams(queryParameters,
- hoodId, 'hood_id');
- }
-
- 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(`${this.configuration.basePath}/api/twitter/callback`,
- {
- params: queryParameters,
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter Create
- * `https://api.twitter.com/oauth/authorize?oauth_token=`
- * @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 createTwitter(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public createTwitter(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public createTwitter(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public createTwitter(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling createTwitter.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
- null,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter Delete
- * @param twitterId
- * @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 deleteTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public deleteTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public deleteTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public deleteTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (twitterId === null || twitterId === undefined) {
- throw new Error('Required parameter twitterId was null or undefined when calling deleteTwitter.');
- }
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling deleteTwitter.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter Read
- * @param twitterId
- * @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 getTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public getTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public getTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public getTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (twitterId === null || twitterId === undefined) {
- throw new Error('Required parameter twitterId was null or undefined when calling getTwitter.');
- }
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling getTwitter.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter 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 getTwitters(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public getTwitters(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public getTwitters(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public getTwitters(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling getTwitters.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter 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 getTwittersPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public getTwittersPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public getTwittersPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public getTwittersPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling getTwittersPublic.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/public`,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter Start
- * @param twitterId
- * @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 startTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public startTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public startTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public startTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (twitterId === null || twitterId === undefined) {
- throw new Error('Required parameter twitterId was null or undefined when calling startTwitter.');
- }
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling startTwitter.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/start`,
- null,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter Status
- * @param twitterId
- * @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 statusTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public statusTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public statusTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public statusTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (twitterId === null || twitterId === undefined) {
- throw new Error('Required parameter twitterId was null or undefined when calling statusTwitter.');
- }
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling statusTwitter.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/status`,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Twitter Stop
- * @param twitterId
- * @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 stopTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable;
- public stopTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public stopTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>;
- public stopTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable {
- if (twitterId === null || twitterId === undefined) {
- throw new Error('Required parameter twitterId was null or undefined when calling stopTwitter.');
- }
- if (hoodId === null || hoodId === undefined) {
- throw new Error('Required parameter hoodId was null or undefined when calling stopTwitter.');
- }
-
- 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(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/stop`,
- null,
- {
- responseType: responseType,
- withCredentials: this.configuration.withCredentials,
- headers: headers,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
-}
diff --git a/frontend/src/app/dashboard/board/hoodpage/hoodpage.component.html b/frontend/src/app/dashboard/board/hoodpage/hoodpage.component.html
index 5acf7d2..dd41c53 100644
--- a/frontend/src/app/dashboard/board/hoodpage/hoodpage.component.html
+++ b/frontend/src/app/dashboard/board/hoodpage/hoodpage.component.html
@@ -49,8 +49,8 @@
Share the hood page: Just send the link to your hood
page to your community. We also recommend to link it in your platform
- account description (e.g. Twitter description) to give the users
- context and more information.
+ account description (e.g. Mastodon account description) to give the
+ users context and more information.
- Twitter bots are twitter accounts operated by software. In our case we will
- show you how to add a bot for users to subscribe to, so they can send
- messages into your hood system by mentioning the bot or direct messaging it,
- which get distributed to the other platforms. Also they can receive messages
- from other platforms by reading the tweets of the bot.
-
-
- Example: You as a hood admin added the bot
- @kibicara-my-hood to your hood. John wants to send a message to all hood
- subscribers. He then uses his twitter account to follow to the bot
- @kibicara-my-hood and sends his message to the bot by sending a tweet. His
- message will be distributed to the other platforms and Sandra who is
- subscribed to your email hood bot gets John's message via email.
-
-
How to add a twitter bot to your hood?
-
-
- Create a twitter account
- for the twitter bot and log in. We recommend NOT to use
- your own personal twitter account but to create a new seperate hood
- account since you will give full access to the account to our software.
-
-
- Click on the Add a new platform connection!-Button. This
- will redirect you to the twitter page to authorize access to the twitter
- account. Click the
- Authorize app
- Button. You will be redirected back here. Done!
-
-
-
-
Can I stop relaying twitter messages?
-
- Yes, if you want to stop relaying twitter messages from a specific twitter
- bot, just use the switch to the bot to stop relaying.
-
- Twitter: We save the id of the last received message (mentions and
- direct messages). This can be a message of yours if you sent the
- latest message.
-
Telegram: We save your telegram username.
E-Mail: We save your e-mail address.
@@ -130,12 +125,6 @@
For hood admins:
We save your e-mail address and your password.
-
- Twitter: We save oauth tokens provided by twitter that give us access
- to the twitter account and the username of the twitter account. We
- disadvice the use of your private twitter account for acting as
- Kibicara platform bot. Please create a new twitter account.
-
Telegram: We save the telegram API token to the provided telegram bot
and a welcome message. Also we retrieve the name of the telegram bot.
diff --git a/frontend/src/app/public-pages/homepage/homepage.component.html b/frontend/src/app/public-pages/homepage/homepage.component.html
index 30d56e3..62c6d08 100644
--- a/frontend/src/app/public-pages/homepage/homepage.component.html
+++ b/frontend/src/app/public-pages/homepage/homepage.component.html
@@ -31,7 +31,7 @@
Inclusive and easy
- Messages sent with Kibicara reach people via Telegram, Twitter and even
+ Messages sent with Kibicara reach people via Telegram, Mastodon and even
E-Mail - perfect for announcing the next neighborhood meetings, creating
news tickers or even providing disaster warnings.
@@ -47,7 +47,7 @@
community-administrated instances of Kibicara, being able to customize
different platform accounts and filters. You subscribe to a Kibicara hood
through your service of choice. This can either be E-Mail, Telegram or
- Twitter.
+ Mastodon.
Discover hoods!