Twitter API + Bot start

This commit is contained in:
Manuel Hude
2021-05-02 10:45:01 +02:00
parent e90ae52267
commit 0a212a6a65
9 changed files with 18559 additions and 26 deletions
@@ -2,6 +2,10 @@ import { Component, OnInit } from '@angular/core';
import {AuthService} from '../../services/auth.service';
import {HttpClient, HttpHeaders} from '@angular/common/http';
class Tweet {
}
@Component({
selector: 'app-tweets',
templateUrl: './tweets.component.html',
@@ -9,6 +13,8 @@ import {HttpClient, HttpHeaders} from '@angular/common/http';
})
export class TweetsComponent implements OnInit {
tweets:Tweet[] = [];
constructor(private http: HttpClient,
private authService: AuthService) { }
@@ -16,10 +22,13 @@ export class TweetsComponent implements OnInit {
}
loadMore() {
console.log('TODO: Implement');
const headerDict = {
'Authorization': 'Bearer ' + this.authService.getToken(),
};
return this.http.get('http://localhost:8000/api/login',
{
headers: new HttpHeaders(headerDict),