Twitter API + Bot start
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user