Move documentation
This commit is contained in:
531
documentation/frontend/injectables/AuthInterceptor.html
Normal file
531
documentation/frontend/injectables/AuthInterceptor.html
Normal file
@@ -0,0 +1,531 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>aktienbot documentation</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
||||
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
||||
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="xs-menu menu" id="mobile-menu">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="xs-modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" class="active" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid main">
|
||||
<div class="row main">
|
||||
<div class="hidden-xs menu">
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" class="active" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
<div class="content injectable">
|
||||
<div class="content-data">
|
||||
|
||||
|
||||
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>Injectables</li>
|
||||
<li>AuthInterceptor</li>
|
||||
</ol>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="infos">
|
||||
<p class="comment">
|
||||
<h3>File</h3>
|
||||
</p>
|
||||
<p class="comment">
|
||||
<code>src/app/Helpers/auth.interceptor.ts</code>
|
||||
</p>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 id="constructor">Constructor</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>constructor(token: <a href="../injectables/TokenStorageService.html" >TokenStorageService</a>)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 id="methods">Methods</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b> intercept</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>intercept(req: HttpRequest<any>, next: HttpHandler)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade tab-source-code" id="source">
|
||||
<pre><code class="hljs javascript">import { HTTP_INTERCEPTORS, HttpEvent } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
HttpInterceptor,
|
||||
HttpHandler,
|
||||
HttpRequest,
|
||||
} from '@angular/common/http';
|
||||
import { TokenStorageService } from '../Services/token.service';
|
||||
import { Observable } from 'rxjs';
|
||||
const TOKEN_HEADER_KEY = 'Authorization';
|
||||
@Injectable()
|
||||
export class AuthInterceptor implements HttpInterceptor {
|
||||
constructor(private token: TokenStorageService) {}
|
||||
intercept(
|
||||
req: HttpRequest<any>,
|
||||
next: HttpHandler
|
||||
): Observable<HttpEvent<any>> {
|
||||
let authReq = req;
|
||||
const token = this.token.getToken();
|
||||
if (token != null) {
|
||||
authReq = req.clone({
|
||||
headers: req.headers.set(TOKEN_HEADER_KEY, 'Bearer ' + token),
|
||||
});
|
||||
}
|
||||
return next.handle(authReq);
|
||||
}
|
||||
}
|
||||
export const authInterceptorProviders = [
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
|
||||
];
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/libs/bootstrap-native.js"></script>
|
||||
|
||||
<script src="../js/libs/es6-shim.min.js"></script>
|
||||
<script src="../js/libs/EventDispatcher.js"></script>
|
||||
<script src="../js/libs/promise.min.js"></script>
|
||||
<script src="../js/libs/zepto.min.js"></script>
|
||||
|
||||
<script src="../js/compodoc.js"></script>
|
||||
|
||||
<script src="../js/search/search.js"></script>
|
||||
<script src="../js/search/lunr.min.js"></script>
|
||||
<script src="../js/search/search-lunr.js"></script>
|
||||
|
||||
<script src="../js/menu.js"></script>
|
||||
<script src="../js/libs/highlight.pack.js"></script>
|
||||
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
||||
<script src="../js/search/search_index.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
hljs.initHighlightingOnLoad();
|
||||
hljs.initLineNumbersOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
634
documentation/frontend/injectables/AuthService.html
Normal file
634
documentation/frontend/injectables/AuthService.html
Normal file
@@ -0,0 +1,634 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>aktienbot documentation</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
||||
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
||||
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="xs-menu menu" id="mobile-menu">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="xs-modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" class="active" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid main">
|
||||
<div class="row main">
|
||||
<div class="hidden-xs menu">
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" class="active" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
<div class="content injectable">
|
||||
<div class="content-data">
|
||||
|
||||
|
||||
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>Injectables</li>
|
||||
<li>AuthService</li>
|
||||
</ol>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="infos">
|
||||
<p class="comment">
|
||||
<h3>File</h3>
|
||||
</p>
|
||||
<p class="comment">
|
||||
<code>src/app/Services/auth.service.ts</code>
|
||||
</p>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 id="constructor">Constructor</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>constructor(http: HttpClient)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 id="methods">Methods</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b> login</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>login(email: string, password: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to login user</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>email</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>password</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b> register</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>register(email: string, username: string, password: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to register user</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>email</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>username</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>password</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade tab-source-code" id="source">
|
||||
<pre><code class="hljs javascript">import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
const AUTH_API = 'https://gruppe1.testsites.info/api/user';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
|
||||
};
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthService {
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
/**
|
||||
* Function to login user
|
||||
* @param {string} email
|
||||
* @param {string} password
|
||||
* @returns Observable
|
||||
*/
|
||||
login(email: string, password: string): Observable<any> {
|
||||
return this.http.post(AUTH_API + '/login', {
|
||||
email,
|
||||
password,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to register user
|
||||
* @param {string} email
|
||||
* @param {string} username
|
||||
* @param {string} password
|
||||
* @returns Observable
|
||||
*/
|
||||
register(email: string, username: string, password: string): Observable<any> {
|
||||
return this.http.post(
|
||||
AUTH_API + '/register',
|
||||
{
|
||||
email,
|
||||
password,
|
||||
username,
|
||||
},
|
||||
httpOptions
|
||||
);
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/libs/bootstrap-native.js"></script>
|
||||
|
||||
<script src="../js/libs/es6-shim.min.js"></script>
|
||||
<script src="../js/libs/EventDispatcher.js"></script>
|
||||
<script src="../js/libs/promise.min.js"></script>
|
||||
<script src="../js/libs/zepto.min.js"></script>
|
||||
|
||||
<script src="../js/compodoc.js"></script>
|
||||
|
||||
<script src="../js/search/search.js"></script>
|
||||
<script src="../js/search/lunr.min.js"></script>
|
||||
<script src="../js/search/search-lunr.js"></script>
|
||||
|
||||
<script src="../js/menu.js"></script>
|
||||
<script src="../js/libs/highlight.pack.js"></script>
|
||||
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
||||
<script src="../js/search/search_index.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
hljs.initHighlightingOnLoad();
|
||||
hljs.initLineNumbersOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
850
documentation/frontend/injectables/BotService.html
Normal file
850
documentation/frontend/injectables/BotService.html
Normal file
@@ -0,0 +1,850 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>aktienbot documentation</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
||||
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
||||
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="xs-menu menu" id="mobile-menu">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="xs-modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" class="active" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid main">
|
||||
<div class="row main">
|
||||
<div class="hidden-xs menu">
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" class="active" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
<div class="content injectable">
|
||||
<div class="content-data">
|
||||
|
||||
|
||||
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>Injectables</li>
|
||||
<li>BotService</li>
|
||||
</ol>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="infos">
|
||||
<p class="comment">
|
||||
<h3>File</h3>
|
||||
</p>
|
||||
<p class="comment">
|
||||
<code>src/app/Services/bot.service.ts</code>
|
||||
</p>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 id="constructor">Constructor</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>constructor(http: HttpClient, tokenStorage: <a href="../injectables/TokenStorageService.html" >TokenStorageService</a>)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 id="methods">Methods</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getKeywords</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getKeywords()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get all keywords</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> createKeyword</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>createKeyword(keyword: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to create a keyword</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>keyword</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> deleteKeyword</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>deleteKeyword(keyword: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to delete a keyword</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>keyword</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getSymbols</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getSymbols()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get all shares</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> createShare</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>createShare(isin: string, comment: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to create a share</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>keyword</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> deleteShare</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>deleteShare(symbol: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to delete a share</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>symbol</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade tab-source-code" id="source">
|
||||
<pre><code class="hljs javascript">import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { TokenStorageService } from './token.service';
|
||||
|
||||
const API_URL = 'https://gruppe1.testsites.info/api/';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class BotService {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private tokenStorage: TokenStorageService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Function to get all keywords
|
||||
* @returns Observable
|
||||
*/
|
||||
public getKeywords(): Observable<any> {
|
||||
return this.http.get(API_URL + 'keywords', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to create a keyword
|
||||
* @param {string} keyword
|
||||
* @returns Observable
|
||||
*/
|
||||
public createKeyword(keyword: string): Observable<any> {
|
||||
return this.http.post(
|
||||
API_URL + 'keyword',
|
||||
{
|
||||
keyword,
|
||||
},
|
||||
{
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to delete a keyword
|
||||
* @param {string} keyword
|
||||
* @returns Observable
|
||||
*/
|
||||
public deleteKeyword(keyword: string): Observable<any> {
|
||||
return this.http.delete(API_URL + 'keyword', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
body: {
|
||||
keyword,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get all shares
|
||||
* @returns Observable
|
||||
*/
|
||||
public getSymbols(): Observable<any> {
|
||||
return this.http.get(API_URL + 'shares', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to create a share
|
||||
* @param {string} keyword
|
||||
* @returns Observable
|
||||
*/
|
||||
public createShare(isin: string, comment: string): Observable<any> {
|
||||
return this.http.post(
|
||||
API_URL + 'share',
|
||||
{
|
||||
comment,
|
||||
isin,
|
||||
},
|
||||
{
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to delete a share
|
||||
* @param {string} symbol
|
||||
* @returns Observable
|
||||
*/
|
||||
public deleteShare(symbol: string): Observable<any> {
|
||||
return this.http.delete(API_URL + 'share', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
body: {
|
||||
symbol,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/libs/bootstrap-native.js"></script>
|
||||
|
||||
<script src="../js/libs/es6-shim.min.js"></script>
|
||||
<script src="../js/libs/EventDispatcher.js"></script>
|
||||
<script src="../js/libs/promise.min.js"></script>
|
||||
<script src="../js/libs/zepto.min.js"></script>
|
||||
|
||||
<script src="../js/compodoc.js"></script>
|
||||
|
||||
<script src="../js/search/search.js"></script>
|
||||
<script src="../js/search/lunr.min.js"></script>
|
||||
<script src="../js/search/search-lunr.js"></script>
|
||||
|
||||
<script src="../js/menu.js"></script>
|
||||
<script src="../js/libs/highlight.pack.js"></script>
|
||||
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
||||
<script src="../js/search/search_index.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
hljs.initHighlightingOnLoad();
|
||||
hljs.initLineNumbersOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
778
documentation/frontend/injectables/DataService.html
Normal file
778
documentation/frontend/injectables/DataService.html
Normal file
@@ -0,0 +1,778 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>aktienbot documentation</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
||||
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
||||
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="xs-menu menu" id="mobile-menu">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="xs-modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" class="active" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid main">
|
||||
<div class="row main">
|
||||
<div class="hidden-xs menu">
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" class="active" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
<div class="content injectable">
|
||||
<div class="content-data">
|
||||
|
||||
|
||||
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>Injectables</li>
|
||||
<li>DataService</li>
|
||||
</ol>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="infos">
|
||||
<p class="comment">
|
||||
<h3>File</h3>
|
||||
</p>
|
||||
<p class="comment">
|
||||
<code>src/app/Services/data.service.ts</code>
|
||||
</p>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 id="constructor">Constructor</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>constructor(http: HttpClient, tokenStorage: <a href="../injectables/TokenStorageService.html" >TokenStorageService</a>)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>privatehttp</b>
|
||||
: <code>HttpClient</code>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>privatetokenStorage</b>
|
||||
: <code><a href="../injectables/TokenStorageService.html" target="_self" >TokenStorageService</a></code>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 id="methods">Methods</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getStockData</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getStockData()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get all portfolio data</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getTransactionData</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getTransactionData()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get all transaction data</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> createTransaction</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>createTransaction(comment: string, isin: string, time: string, count: number, price: number)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to create a transaction</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>symbol</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>time</b>
|
||||
: <code>Date</code>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>count</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>price</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getKeywords</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getKeywords()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get all keywords</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade tab-source-code" id="source">
|
||||
<pre><code class="hljs javascript">import { Injectable, OnInit } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { delay, Observable } from 'rxjs';
|
||||
import { TokenStorageService } from './token.service';
|
||||
const API_URL = 'https://gruppe1.testsites.info/api/';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DataService {
|
||||
/**
|
||||
* @param {HttpClient} privatehttp
|
||||
* @param {TokenStorageService} privatetokenStorage
|
||||
*/
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private tokenStorage: TokenStorageService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Function to get all portfolio data
|
||||
* @returns Observable
|
||||
*/
|
||||
public getStockData(): Observable<any> {
|
||||
return this.http.get(API_URL + 'portfolio', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get all transaction data
|
||||
* @returns Observable
|
||||
*/
|
||||
public getTransactionData(): Observable<any> {
|
||||
return this.http.get(API_URL + 'transactions', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to create a transaction
|
||||
* @param {string} symbol
|
||||
* @param {Date} time
|
||||
* @param {number} count
|
||||
* @param {number} price
|
||||
* @returns Observable
|
||||
*/
|
||||
public createTransaction(
|
||||
comment: string,
|
||||
isin: string,
|
||||
time: string,
|
||||
count: number,
|
||||
price: number
|
||||
): Observable<any> {
|
||||
time = time + 'T12:00:00.000Z';
|
||||
price.toFixed(2);
|
||||
return this.http.post(
|
||||
API_URL + 'transaction',
|
||||
{
|
||||
comment,
|
||||
count,
|
||||
isin,
|
||||
price,
|
||||
time,
|
||||
},
|
||||
{
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get all keywords
|
||||
* @returns Observable
|
||||
*/
|
||||
public getKeywords(): Observable<any> {
|
||||
return this.http.get(API_URL + 'keywords', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
});
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/libs/bootstrap-native.js"></script>
|
||||
|
||||
<script src="../js/libs/es6-shim.min.js"></script>
|
||||
<script src="../js/libs/EventDispatcher.js"></script>
|
||||
<script src="../js/libs/promise.min.js"></script>
|
||||
<script src="../js/libs/zepto.min.js"></script>
|
||||
|
||||
<script src="../js/compodoc.js"></script>
|
||||
|
||||
<script src="../js/search/search.js"></script>
|
||||
<script src="../js/search/lunr.min.js"></script>
|
||||
<script src="../js/search/search-lunr.js"></script>
|
||||
|
||||
<script src="../js/menu.js"></script>
|
||||
<script src="../js/libs/highlight.pack.js"></script>
|
||||
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
||||
<script src="../js/search/search_index.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
hljs.initHighlightingOnLoad();
|
||||
hljs.initLineNumbersOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
632
documentation/frontend/injectables/HelperService.html
Normal file
632
documentation/frontend/injectables/HelperService.html
Normal file
@@ -0,0 +1,632 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>aktienbot documentation</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
||||
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
||||
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="xs-menu menu" id="mobile-menu">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="xs-modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" class="active" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid main">
|
||||
<div class="row main">
|
||||
<div class="hidden-xs menu">
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" class="active" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
<div class="content injectable">
|
||||
<div class="content-data">
|
||||
|
||||
|
||||
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>Injectables</li>
|
||||
<li>HelperService</li>
|
||||
</ol>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="infos">
|
||||
<p class="comment">
|
||||
<h3>File</h3>
|
||||
</p>
|
||||
<p class="comment">
|
||||
<code>src/app/Helpers/helper.service.ts</code>
|
||||
</p>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 id="constructor">Constructor</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>constructor(botService: <a href="../injectables/BotService.html" >BotService</a>)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 id="methods">Methods</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b> delay</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>delay(ms: number)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to delay loading of webpage for a smoother user experience</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>ms</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>void</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b> formatShareData</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>formatShareData()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to format share data</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>Share[]</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Share</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b> formatKeywordsData</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>formatKeywordsData()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>Keyword[]</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Keyword<br>Function to format keyword data</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade tab-source-code" id="source">
|
||||
<pre><code class="hljs javascript">import { Injectable } from '@angular/core';
|
||||
import { BotService } from '../Services/bot.service';
|
||||
import { Keyword, Share } from '../Views/bot-settings/bot-settings.component';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class HelperService {
|
||||
constructor(private botService: BotService) {}
|
||||
|
||||
/**
|
||||
* Function to delay loading of webpage for a smoother user experience
|
||||
* @param {number} ms
|
||||
*/
|
||||
delay(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to format share data
|
||||
* @returns Share
|
||||
*/
|
||||
formatShareData(): Share[] {
|
||||
var shares: Share[] = [];
|
||||
this.botService.getSymbols().subscribe((result) => {
|
||||
var data = JSON.parse(result);
|
||||
for (let i = 0; i < data.data.length; i++) {
|
||||
shares.push({
|
||||
isin: data.data[i].isin,
|
||||
});
|
||||
}
|
||||
});
|
||||
return shares;
|
||||
}
|
||||
/**
|
||||
* @returns Keyword
|
||||
* Function to format keyword data
|
||||
*/
|
||||
formatKeywordsData(): Keyword[] {
|
||||
var keywords: Keyword[] = [];
|
||||
this.botService.getKeywords().subscribe((result) => {
|
||||
var data = JSON.parse(result);
|
||||
for (let i = 0; i < data.data.length; i++) {
|
||||
keywords.push({
|
||||
name: data.data[i].keyword,
|
||||
});
|
||||
}
|
||||
});
|
||||
return keywords;
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/libs/bootstrap-native.js"></script>
|
||||
|
||||
<script src="../js/libs/es6-shim.min.js"></script>
|
||||
<script src="../js/libs/EventDispatcher.js"></script>
|
||||
<script src="../js/libs/promise.min.js"></script>
|
||||
<script src="../js/libs/zepto.min.js"></script>
|
||||
|
||||
<script src="../js/compodoc.js"></script>
|
||||
|
||||
<script src="../js/search/search.js"></script>
|
||||
<script src="../js/search/lunr.min.js"></script>
|
||||
<script src="../js/search/search-lunr.js"></script>
|
||||
|
||||
<script src="../js/menu.js"></script>
|
||||
<script src="../js/libs/highlight.pack.js"></script>
|
||||
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
||||
<script src="../js/search/search_index.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
hljs.initHighlightingOnLoad();
|
||||
hljs.initLineNumbersOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
750
documentation/frontend/injectables/ProfileService.html
Normal file
750
documentation/frontend/injectables/ProfileService.html
Normal file
@@ -0,0 +1,750 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>aktienbot documentation</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
||||
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
||||
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="xs-menu menu" id="mobile-menu">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="xs-modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" class="active" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid main">
|
||||
<div class="row main">
|
||||
<div class="hidden-xs menu">
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" class="active" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
<div class="content injectable">
|
||||
<div class="content-data">
|
||||
|
||||
|
||||
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>Injectables</li>
|
||||
<li>ProfileService</li>
|
||||
</ol>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="infos">
|
||||
<p class="comment">
|
||||
<h3>File</h3>
|
||||
</p>
|
||||
<p class="comment">
|
||||
<code>src/app/Services/profile.service.ts</code>
|
||||
</p>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 id="constructor">Constructor</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>constructor(tokenStorage: <a href="../injectables/TokenStorageService.html" >TokenStorageService</a>, http: HttpClient)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 id="methods">Methods</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getUserData</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getUserData()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get all Userdata</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> updateProfile</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>updateProfile(username: string, password: number)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to update user profile</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>username</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<b>password</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> addTelegramId</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>addTelegramId(telegram_user_id: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to add a telegram id</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>telegramUserID</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> addCronString</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>addCronString(cron: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to add a cron string for automatic updates</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>cronString</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>Observable</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade tab-source-code" id="source">
|
||||
<pre><code class="hljs javascript">import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { TokenStorageService } from './token.service';
|
||||
|
||||
const API_URL = 'https://gruppe1.testsites.info/api/';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ProfileService {
|
||||
constructor(
|
||||
private tokenStorage: TokenStorageService,
|
||||
private http: HttpClient
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Function to get all Userdata
|
||||
* @returns Observable
|
||||
*/
|
||||
public getUserData(): Observable<any> {
|
||||
return this.http.get(API_URL + 'user', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to update user profile
|
||||
* @param {string} username
|
||||
* @param {number} password
|
||||
* @returns Observable
|
||||
*/
|
||||
public updateProfile(username: string, password: number): Observable<any> {
|
||||
return this.http.put(
|
||||
API_URL + 'user',
|
||||
{
|
||||
username,
|
||||
password,
|
||||
},
|
||||
{
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to add a telegram id
|
||||
* @param {string} telegramUserID
|
||||
* @returns Observable
|
||||
*/
|
||||
public addTelegramId(telegram_user_id: string): Observable<any> {
|
||||
return this.http.post(
|
||||
API_URL + 'telegram',
|
||||
{
|
||||
telegram_user_id,
|
||||
},
|
||||
{
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to add a cron string for automatic updates
|
||||
* @param {string} cronString
|
||||
* @returns Observable
|
||||
*/
|
||||
public addCronString(cron: string): Observable<any> {
|
||||
return this.http.put(
|
||||
'https://gruppe1.testsites.info/api/user' + '/setCron',
|
||||
{
|
||||
cron,
|
||||
},
|
||||
{
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/libs/bootstrap-native.js"></script>
|
||||
|
||||
<script src="../js/libs/es6-shim.min.js"></script>
|
||||
<script src="../js/libs/EventDispatcher.js"></script>
|
||||
<script src="../js/libs/promise.min.js"></script>
|
||||
<script src="../js/libs/zepto.min.js"></script>
|
||||
|
||||
<script src="../js/compodoc.js"></script>
|
||||
|
||||
<script src="../js/search/search.js"></script>
|
||||
<script src="../js/search/lunr.min.js"></script>
|
||||
<script src="../js/search/search-lunr.js"></script>
|
||||
|
||||
<script src="../js/menu.js"></script>
|
||||
<script src="../js/libs/highlight.pack.js"></script>
|
||||
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
||||
<script src="../js/search/search_index.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
hljs.initHighlightingOnLoad();
|
||||
hljs.initLineNumbersOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
728
documentation/frontend/injectables/TokenStorageService.html
Normal file
728
documentation/frontend/injectables/TokenStorageService.html
Normal file
@@ -0,0 +1,728 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>aktienbot documentation</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
||||
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
||||
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
||||
</div>
|
||||
|
||||
<div class="xs-menu menu" id="mobile-menu">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="xs-modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" class="active" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#xs-interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="xs-interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid main">
|
||||
<div class="row main">
|
||||
<div class="hidden-xs menu">
|
||||
<nav>
|
||||
|
||||
<ul class="list">
|
||||
|
||||
<li class="title">
|
||||
<a href="../">aktienbot documentation</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search">
|
||||
</div>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
||||
<ul class="links">
|
||||
<li class="link">
|
||||
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a
|
||||
|
||||
href="../overview.html"
|
||||
href="../overview.html"
|
||||
>
|
||||
<span class="fa fa-th"></span>Overview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="./modules.html" >
|
||||
<span class="fa fa-archive"></span>
|
||||
<span>Modules</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#modules-links"
|
||||
></span>
|
||||
</a>
|
||||
<ul class="links collapse in"
|
||||
id="modules-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../modules/AppModule.html" >AppModule</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-cogs"></span>
|
||||
<span>Components</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#components-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="components-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../components/AppComponent.html" >AppComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-long-arrow-down"></span>
|
||||
<span>Injectables</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#injectables-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="injectables-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/AuthService.html" >AuthService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/BotService.html" >BotService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/DataService.html" >DataService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/HelperService.html" >HelperService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../injectables/TokenStorageService.html" class="active" >TokenStorageService</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<div class="simple">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>Interfaces</span>
|
||||
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
||||
data-target="#interfaces-links"
|
||||
></span>
|
||||
</div>
|
||||
<ul class="links collapse in"
|
||||
id="interfaces-links"
|
||||
>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Keyword.html" >Keyword</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Share.html" >Share</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/Stock.html" >Stock</a>
|
||||
</li>
|
||||
<li class="link">
|
||||
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
||||
</li>
|
||||
|
||||
<li class="chapter">
|
||||
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li class="copyright">
|
||||
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
||||
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
<div class="content injectable">
|
||||
<div class="content-data">
|
||||
|
||||
|
||||
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>Injectables</li>
|
||||
<li>TokenStorageService</li>
|
||||
</ol>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="infos">
|
||||
<p class="comment">
|
||||
<h3>File</h3>
|
||||
</p>
|
||||
<p class="comment">
|
||||
<code>src/app/Services/token.service.ts</code>
|
||||
</p>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 id="constructor">Constructor</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>constructor()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 id="methods">Methods</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b> signOut</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<code>signOut()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to sign out user</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>void</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>void</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> saveToken</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>saveToken(token: string)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to save token</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>token</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>void</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>void</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getToken</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getToken()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get token</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>string</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>string</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> saveUser</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>saveUser(user: any)</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to save user</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Parameters :</b>
|
||||
<ul class="jsdoc-params">
|
||||
<li>
|
||||
<div>
|
||||
<b>user</b>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>void</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>void</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<b><span class="modifier">Public</span> getUser</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<span class="modifier-icon method fa fa-play circle">
|
||||
<span class="fa fa-circle"></span>
|
||||
</span>
|
||||
<code>getUser()</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-description"><p>Function to get user</p>
|
||||
</div>
|
||||
<div class="io-description">
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<b>Returns: </b> <code>any</code>
|
||||
|
||||
</div>
|
||||
<div class="io-description">
|
||||
<p>any</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade tab-source-code" id="source">
|
||||
<pre><code class="hljs javascript">import { Injectable } from '@angular/core';
|
||||
const TOKEN_KEY = 'auth-token';
|
||||
const USER_KEY = 'auth-user';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class TokenStorageService {
|
||||
constructor() {}
|
||||
|
||||
/**
|
||||
* Function to sign out user
|
||||
* @returns void
|
||||
*/
|
||||
signOut(): void {
|
||||
window.sessionStorage.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to save token
|
||||
* @param {string} token
|
||||
* @returns void
|
||||
*/
|
||||
public saveToken(token: string): void {
|
||||
window.sessionStorage.removeItem(TOKEN_KEY);
|
||||
window.sessionStorage.setItem(TOKEN_KEY, token);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get token
|
||||
* @returns string
|
||||
*/
|
||||
public getToken(): string | null {
|
||||
return window.sessionStorage.getItem(TOKEN_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to save user
|
||||
* @param {any} user
|
||||
* @returns void
|
||||
*/
|
||||
public saveUser(user: any): void {
|
||||
window.sessionStorage.removeItem(USER_KEY);
|
||||
window.sessionStorage.setItem(USER_KEY, JSON.stringify(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get user
|
||||
* @returns any
|
||||
*/
|
||||
public getUser(): any {
|
||||
const user = window.sessionStorage.getItem(USER_KEY);
|
||||
if (user) {
|
||||
return JSON.parse(user);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/libs/bootstrap-native.js"></script>
|
||||
|
||||
<script src="../js/libs/es6-shim.min.js"></script>
|
||||
<script src="../js/libs/EventDispatcher.js"></script>
|
||||
<script src="../js/libs/promise.min.js"></script>
|
||||
<script src="../js/libs/zepto.min.js"></script>
|
||||
|
||||
<script src="../js/compodoc.js"></script>
|
||||
|
||||
<script src="../js/search/search.js"></script>
|
||||
<script src="../js/search/lunr.min.js"></script>
|
||||
<script src="../js/search/search-lunr.js"></script>
|
||||
|
||||
<script src="../js/menu.js"></script>
|
||||
<script src="../js/libs/highlight.pack.js"></script>
|
||||
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
||||
<script src="../js/search/search_index.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
hljs.initHighlightingOnLoad();
|
||||
hljs.initLineNumbersOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user