2022-05-03 08:59:36 +00:00
|
|
|
<!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">
|
2022-05-10 11:03:10 +00:00
|
|
|
<link rel="stylesheet" href="../styles/style.css">
|
2022-05-03 08:59:36 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
|
|
|
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
2022-05-10 11:03:10 +00:00
|
|
|
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
2022-05-03 08:59:36 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="xs-menu menu" id="mobile-menu">
|
2022-05-10 11:03:10 +00:00
|
|
|
<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>
|
2022-05-03 08:59:36 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container-fluid main">
|
|
|
|
<div class="row main">
|
|
|
|
<div class="hidden-xs menu">
|
2022-05-10 11:03:10 +00:00
|
|
|
<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>
|
2022-05-03 08:59:36 +00:00
|
|
|
</div>
|
|
|
|
<div class="content injectable">
|
|
|
|
<div class="content-data">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li>Injectables</li>
|
2022-05-10 11:03:10 +00:00
|
|
|
<li>BotService</li>
|
2022-05-03 08:59:36 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
2022-05-10 11:03:10 +00:00
|
|
|
<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>
|
2022-05-03 08:59:36 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
2022-05-10 11:03:10 +00:00
|
|
|
<div class="tab-pane fade active in" id="infos">
|
2022-05-03 08:59:36 +00:00
|
|
|
<p class="comment">
|
|
|
|
<h3>File</h3>
|
|
|
|
</p>
|
|
|
|
<p class="comment">
|
|
|
|
<code>src/app/Services/bot.service.ts</code>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
2022-05-10 11:03:10 +00:00
|
|
|
<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>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
|
|
|
<section>
|
2022-05-10 11:03:10 +00:00
|
|
|
<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>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
|
|
|
</div>
|
2022-05-10 11:03:10 +00:00
|
|
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
|
|
<pre><code class="hljs javascript">import { HttpClient, HttpHeaders } from '@angular/common/http';
|
2022-05-03 08:59:36 +00:00
|
|
|
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
|
|
|
|
) {}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to get all keywords
|
2022-05-03 08:59:36 +00:00
|
|
|
* @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',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to create a keyword
|
2022-05-03 08:59:36 +00:00
|
|
|
* @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(),
|
|
|
|
}),
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to delete a keyword
|
2022-05-03 08:59:36 +00:00
|
|
|
* @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,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to get all shares
|
2022-05-03 08:59:36 +00:00
|
|
|
* @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',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to create a share
|
2022-05-03 08:59:36 +00:00
|
|
|
* @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(),
|
|
|
|
}),
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to delete a share
|
2022-05-03 08:59:36 +00:00
|
|
|
* @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>
|
|
|
|
|
2022-05-10 11:03:10 +00:00
|
|
|
<script src="../js/search/search.js"></script>
|
|
|
|
<script src="../js/search/lunr.min.js"></script>
|
|
|
|
<script src="../js/search/search-lunr.js"></script>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
2022-05-10 11:03:10 +00:00
|
|
|
<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>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|