Compare commits
1 Commits
e794ad7eb6
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
a8906eb5ab |
27
.github/dependabot.yml
vendored
Normal file
27
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
# API
|
||||
- package-ecosystem: "pip"
|
||||
directory: "/api"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 100
|
||||
|
||||
# Bot
|
||||
- package-ecosystem: "pip"
|
||||
directory: "/telegram_bot"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 100
|
||||
|
||||
# Frontend
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/frontend"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 100
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"schedule": ["* 5 * * *"]
|
||||
}
|
@@ -77,9 +77,9 @@ pipeline:
|
||||
password:
|
||||
from_secret: ssh_password
|
||||
script:
|
||||
- cd ~/docker-compose-files/telegram_aktien_bot
|
||||
- cd /root/docker/aktienbot
|
||||
- docker-compose pull
|
||||
- docker-compose --env-file ~/docker-compose-env/telegram_aktien_bot.env up -d
|
||||
- docker-compose -p "aktienbot" up -d
|
||||
when:
|
||||
path: [ "frontend/**", "telegram_bot/**", "api/**" ]
|
||||
event: push
|
16
README.md
16
README.md
@@ -1,4 +1,4 @@
|
||||
[](https://gitea.woodpecker.flokaiser.com/DHBW/TelegramAktienBot)
|
||||
[](https://woodpecker.flokaiser.com/WebEngineering2/TelegramAktienBot/)
|
||||
# TelegramAktienBot
|
||||
WebEngineering2 Projekt: Aktien und News Bot für Telegram
|
||||
|
||||
@@ -21,4 +21,16 @@ WebEngineering2 Projekt: Aktien und News Bot für Telegram
|
||||
* Florian Kaiser
|
||||
* Florian Kellermann
|
||||
* Linus Eickhoff
|
||||
* Kevin Pauer
|
||||
* Kevin Pauer
|
||||
|
||||
## Nützliche Tools
|
||||
- Portainer (https://gruppe1.testsites.info/portainer/) \
|
||||
*Container Management System*
|
||||
- phpMyAdmin (https://gruppe1.testsites.info/phpmyadmin/) \
|
||||
*Administration von MySQL-Datenbanken*
|
||||
- goaccess (https://gruppe1.testsites.info/goaccess/) \
|
||||
*Webanalyseanwendung*
|
||||
- Uptimekuma (https://uptimekuma.flokaiser.com/status/aktienbot) \
|
||||
*Monitoring*
|
||||
- Woodpecker (https://woodpecker.flokaiser.com/WebEngineering2/TelegramAktienBot) \
|
||||
*Continuous Integration platform*
|
||||
|
@@ -64,15 +64,10 @@ token = requests.post(os.getenv("API_URL") + '/user/login', json={"email": usern
|
||||
|
||||
response = requests.get(os.getenv("API_URL") + '/symbols', headers={'Authorization': 'Bearer ' + token}).json()['data']
|
||||
|
||||
if len(response) > 5:
|
||||
symbols = split(response, int(len(response) / 5))
|
||||
for symbol_list in symbols:
|
||||
for symbol in symbol_list:
|
||||
x = threading.Thread(target=thread_function, args=(symbol,))
|
||||
x.start()
|
||||
|
||||
time.sleep(10)
|
||||
else:
|
||||
for symbol in response:
|
||||
symbols = split(response, int(len(response) / 5))
|
||||
for symbol_list in symbols:
|
||||
for symbol in symbol_list:
|
||||
x = threading.Thread(target=thread_function, args=(symbol,))
|
||||
x.start()
|
||||
x.start()
|
||||
|
||||
time.sleep(10)
|
||||
|
@@ -15,4 +15,4 @@ faker~=13.11.0
|
||||
requests~=2.27.1
|
||||
investpy~=1.0.8
|
||||
pandas~=1.4.2
|
||||
currencyconverter~=0.17.1
|
||||
currencyconverter~=0.16.12
|
@@ -12,7 +12,7 @@ BOT_EMAIL=
|
||||
BOT_PASSWORD=
|
||||
|
||||
# urls
|
||||
APP_URL=
|
||||
WEBSITE_URL=
|
||||
API_URL=
|
||||
|
||||
# timezone
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Dokumentation
|
||||
|
||||
## Swagger Documentation
|
||||
Visit \<API_URL\> + /docs
|
||||
Visit https://gruppe1.testsites.info/api/docs
|
||||
|
||||
## API
|
||||
- `api/openapi.json`
|
||||
|
514
frontend/package-lock.json
generated
514
frontend/package-lock.json
generated
@@ -27,7 +27,7 @@
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.3.5",
|
||||
"@angular-eslint/builder": "13.2.1",
|
||||
"@angular-eslint/eslint-plugin": "13.2.1",
|
||||
"@angular-eslint/eslint-plugin": "14.0.4",
|
||||
"@angular-eslint/eslint-plugin-template": "13.2.1",
|
||||
"@angular-eslint/schematics": "13.2.1",
|
||||
"@angular-eslint/template-parser": "13.2.1",
|
||||
@@ -377,13 +377,13 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-13.2.1.tgz",
|
||||
"integrity": "sha512-hlHzbe7MIBbZ4IUKvJh5pjN5nKw0YZBwPyIB1+IBOJAdjWuS274uUGTZxKeyJiyJi0FOUu5+Z6vbM9ZJ2uzjcw==",
|
||||
"version": "14.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-14.0.4.tgz",
|
||||
"integrity": "sha512-sPEXAZ/+u0jL849HV1dsc9C15zsiEiOd0Fo5St2YhZuCNsn94kg5zyai5p85/5tbpM6vchaH9cB4fZ3WE+FOog==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@angular-eslint/utils": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
"@angular-eslint/utils": "14.0.4",
|
||||
"@typescript-eslint/utils": "5.36.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0",
|
||||
@@ -406,6 +406,136 @@
|
||||
"typescript": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz",
|
||||
"integrity": "sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.36.2.tgz",
|
||||
"integrity": "sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz",
|
||||
"integrity": "sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.36.2.tgz",
|
||||
"integrity": "sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz",
|
||||
"integrity": "sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin/node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/eslint-plugin/node_modules/semver": {
|
||||
"version": "7.3.7",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
||||
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/schematics": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-13.2.1.tgz",
|
||||
@@ -422,6 +552,34 @@
|
||||
"@angular/cli": ">= 13.0.0 < 14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/schematics/node_modules/@angular-eslint/eslint-plugin": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-13.2.1.tgz",
|
||||
"integrity": "sha512-hlHzbe7MIBbZ4IUKvJh5pjN5nKw0YZBwPyIB1+IBOJAdjWuS274uUGTZxKeyJiyJi0FOUu5+Z6vbM9ZJ2uzjcw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@angular-eslint/utils": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0",
|
||||
"typescript": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/schematics/node_modules/@angular-eslint/utils": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-13.2.1.tgz",
|
||||
"integrity": "sha512-TCw56jQDPe/FDg3IC0QTQVn4mv5Pzb8K4YpO2hiBdU4XwmOTGWjbwZO++Wr1Gekw1OJYVWSIwNfz2MrGIDsu7A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@angular-eslint/bundled-angular-compiler": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0",
|
||||
"typescript": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/template-parser": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-13.2.1.tgz",
|
||||
@@ -437,19 +595,155 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-13.2.1.tgz",
|
||||
"integrity": "sha512-TCw56jQDPe/FDg3IC0QTQVn4mv5Pzb8K4YpO2hiBdU4XwmOTGWjbwZO++Wr1Gekw1OJYVWSIwNfz2MrGIDsu7A==",
|
||||
"version": "14.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-14.0.4.tgz",
|
||||
"integrity": "sha512-7BcK+g0qaMRXfRFeOf57UOb5R4V8/uzGLyeXkugA65s7BLDLPEV1StRTpGW7w4jK7I8sldfsnbrkJqb6hgQtfA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@angular-eslint/bundled-angular-compiler": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
"@angular-eslint/bundled-angular-compiler": "14.0.4",
|
||||
"@typescript-eslint/utils": "5.36.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0",
|
||||
"typescript": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/@angular-eslint/bundled-angular-compiler": {
|
||||
"version": "14.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-14.0.4.tgz",
|
||||
"integrity": "sha512-/fbXDvkm4q95xG/9LZDtiyE2MQwT061sanmMginDk63f0dlC4H+AXgggva38YNRN+CFcbFtWfikTy7yFdNFZlA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz",
|
||||
"integrity": "sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/types": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.36.2.tgz",
|
||||
"integrity": "sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz",
|
||||
"integrity": "sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.36.2.tgz",
|
||||
"integrity": "sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz",
|
||||
"integrity": "sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@angular-eslint/utils/node_modules/semver": {
|
||||
"version": "7.3.7",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
||||
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular/animations": {
|
||||
"version": "13.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-13.2.7.tgz",
|
||||
@@ -14232,13 +14526,88 @@
|
||||
"dev": true
|
||||
},
|
||||
"@angular-eslint/eslint-plugin": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-13.2.1.tgz",
|
||||
"integrity": "sha512-hlHzbe7MIBbZ4IUKvJh5pjN5nKw0YZBwPyIB1+IBOJAdjWuS274uUGTZxKeyJiyJi0FOUu5+Z6vbM9ZJ2uzjcw==",
|
||||
"version": "14.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-14.0.4.tgz",
|
||||
"integrity": "sha512-sPEXAZ/+u0jL849HV1dsc9C15zsiEiOd0Fo5St2YhZuCNsn94kg5zyai5p85/5tbpM6vchaH9cB4fZ3WE+FOog==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@angular-eslint/utils": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
"@angular-eslint/utils": "14.0.4",
|
||||
"@typescript-eslint/utils": "5.36.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz",
|
||||
"integrity": "sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.36.2.tgz",
|
||||
"integrity": "sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz",
|
||||
"integrity": "sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.36.2.tgz",
|
||||
"integrity": "sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz",
|
||||
"integrity": "sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.7",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
||||
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@angular-eslint/eslint-plugin-template": {
|
||||
@@ -14264,6 +14633,28 @@
|
||||
"ignore": "5.2.0",
|
||||
"strip-json-comments": "3.1.1",
|
||||
"tmp": "0.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular-eslint/eslint-plugin": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-13.2.1.tgz",
|
||||
"integrity": "sha512-hlHzbe7MIBbZ4IUKvJh5pjN5nKw0YZBwPyIB1+IBOJAdjWuS274uUGTZxKeyJiyJi0FOUu5+Z6vbM9ZJ2uzjcw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@angular-eslint/utils": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
}
|
||||
},
|
||||
"@angular-eslint/utils": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-13.2.1.tgz",
|
||||
"integrity": "sha512-TCw56jQDPe/FDg3IC0QTQVn4mv5Pzb8K4YpO2hiBdU4XwmOTGWjbwZO++Wr1Gekw1OJYVWSIwNfz2MrGIDsu7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@angular-eslint/bundled-angular-compiler": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@angular-eslint/template-parser": {
|
||||
@@ -14277,13 +14668,94 @@
|
||||
}
|
||||
},
|
||||
"@angular-eslint/utils": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-13.2.1.tgz",
|
||||
"integrity": "sha512-TCw56jQDPe/FDg3IC0QTQVn4mv5Pzb8K4YpO2hiBdU4XwmOTGWjbwZO++Wr1Gekw1OJYVWSIwNfz2MrGIDsu7A==",
|
||||
"version": "14.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-14.0.4.tgz",
|
||||
"integrity": "sha512-7BcK+g0qaMRXfRFeOf57UOb5R4V8/uzGLyeXkugA65s7BLDLPEV1StRTpGW7w4jK7I8sldfsnbrkJqb6hgQtfA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@angular-eslint/bundled-angular-compiler": "13.2.1",
|
||||
"@typescript-eslint/experimental-utils": "5.17.0"
|
||||
"@angular-eslint/bundled-angular-compiler": "14.0.4",
|
||||
"@typescript-eslint/utils": "5.36.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular-eslint/bundled-angular-compiler": {
|
||||
"version": "14.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-14.0.4.tgz",
|
||||
"integrity": "sha512-/fbXDvkm4q95xG/9LZDtiyE2MQwT061sanmMginDk63f0dlC4H+AXgggva38YNRN+CFcbFtWfikTy7yFdNFZlA==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz",
|
||||
"integrity": "sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.36.2.tgz",
|
||||
"integrity": "sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz",
|
||||
"integrity": "sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.36.2.tgz",
|
||||
"integrity": "sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz",
|
||||
"integrity": "sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.7",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
||||
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@angular/animations": {
|
||||
|
@@ -31,7 +31,7 @@
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.3.5",
|
||||
"@angular-eslint/builder": "13.2.1",
|
||||
"@angular-eslint/eslint-plugin": "13.2.1",
|
||||
"@angular-eslint/eslint-plugin": "14.0.4",
|
||||
"@angular-eslint/eslint-plugin-template": "13.2.1",
|
||||
"@angular-eslint/schematics": "13.2.1",
|
||||
"@angular-eslint/template-parser": "13.2.1",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
const AUTH_API = '/api/user';
|
||||
const AUTH_API = 'https://gruppe1.testsites.info/api/user';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
|
||||
|
@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { TokenStorageService } from './token.service';
|
||||
|
||||
const API_URL = '/api/';
|
||||
const API_URL = 'https://gruppe1.testsites.info/api/';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@@ -2,7 +2,7 @@ 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 = '/api/';
|
||||
const API_URL = 'https://gruppe1.testsites.info/api/';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
|
@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { TokenStorageService } from './token.service';
|
||||
|
||||
const API_URL = '/api/';
|
||||
const API_URL = 'https://gruppe1.testsites.info/api/';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -77,7 +77,7 @@ export class ProfileService {
|
||||
*/
|
||||
public addCronString(cron: string): Observable<any> {
|
||||
return this.http.put(
|
||||
'/api/user' + '/setCron',
|
||||
'https://gruppe1.testsites.info/api/user' + '/setCron',
|
||||
{
|
||||
cron,
|
||||
},
|
||||
|
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||
}
|
@@ -12,7 +12,7 @@ BOT_EMAIL=
|
||||
BOT_PASSWORD=
|
||||
|
||||
# urls
|
||||
APP_URL=
|
||||
WEBSITE_URL=
|
||||
API_URL=
|
||||
|
||||
# timezone
|
||||
|
@@ -19,7 +19,7 @@ from dotenv import load_dotenv
|
||||
load_dotenv() # loads environment vars
|
||||
|
||||
|
||||
# note: for more information about the api visit swagger documentation on os.getenv("API_URL")/docs#/
|
||||
# note: for more information about the api visit swagger documentation on https://gruppe1.testsites.info/api/docs#/
|
||||
|
||||
class API_Handler:
|
||||
"""class for interacting with the api webservice
|
||||
@@ -392,7 +392,7 @@ class API_Handler:
|
||||
if __name__ == "__main__": # editable, just for basic on the go testing of new functions
|
||||
|
||||
print("This is a module for the telegram bot. It is not intended to be run directly.")
|
||||
handler = API_Handler(os.getenv("API_URL"), str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD"))) # get creds from env
|
||||
handler = API_Handler("https://gruppe1.testsites.info/api", str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD"))) # get creds from env
|
||||
print(handler.token)
|
||||
keywords = handler.get_user_keywords(user_id=1709356058) # user_id here is currently mine (Linus)
|
||||
print(keywords)
|
||||
|
@@ -50,7 +50,7 @@ def send_start(message):
|
||||
"""
|
||||
bot.reply_to(message, "Welcome to this share bot project. \
|
||||
\nType /help to get information on what this bot can do. \
|
||||
\nAlso see " + os.getenv("APP_URL") + " \
|
||||
\nAlso see " + os.getenv("WEBSITE_URL") + " \
|
||||
to start configuring your bot")
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ def send_help(message):
|
||||
:rtype: none
|
||||
"""
|
||||
bot.reply_to(message,
|
||||
"/id or /auth get your user id\n/shares get update on interesting shares\n/setAdmin set admin rights of user (ADMIN)\n/users see all users. (ADMIN)\n/me get my user info\n/news get top article for each keyword.\n/allnews get all news (last 7 days)\n/keywords get all your keywords\n/addkeyword add a keyword\n/removekeyword remove a keyword\n/transactions get all transactions\n/newtransaction create new transaction\n/share get price of specific share\n/portfolio see own stock portfolio\n/removeshare removes share from portfolio\n/interval get update interval\n/setinterval set update interval\n For further details see " + os.getenv("APP_URL"))
|
||||
"/id or /auth get your user id\n/shares get update on interesting shares\n/setAdmin set admin rights of user (ADMIN)\n/users see all users. (ADMIN)\n/me get my user info\n/news get top article for each keyword.\n/allnews get all news (last 7 days)\n/keywords get all your keywords\n/addkeyword add a keyword\n/removekeyword remove a keyword\n/transactions get all transactions\n/newtransaction create new transaction\n/share get price of specific share\n/portfolio see own stock portfolio\n/removeshare removes share from portfolio\n/interval get update interval\n/setinterval set update interval\n For further details see " + os.getenv("WEBSITE_URL"))
|
||||
|
||||
|
||||
@bot.message_handler(commands=['users', 'Users']) # /users -> sending all users
|
||||
@@ -170,7 +170,7 @@ def send_user(message):
|
||||
user_id = int(message.from_user.id)
|
||||
user_data = api_handler.get_user(user_id)
|
||||
if not user_data or user_data == None: # true if user is not registered
|
||||
bot.reply_to(message, "This didn\'t work. Make sure to connect your telegram id (/id) on " + os.getenv("APP_URL"))
|
||||
bot.reply_to(message, "This didn\'t work. Make sure to connect your telegram id (/id) on " + os.getenv("WEBSITE_URL"))
|
||||
return
|
||||
username = user_data['username']
|
||||
email = user_data['email']
|
||||
@@ -190,7 +190,7 @@ def send_id(message):
|
||||
|
||||
:rtype: none
|
||||
"""
|
||||
answer = 'Your ID/Authentication Code is: [' + str(message.from_user.id) + ']. Enter this code in the settings on ' + os.getenv("APP_URL") + ' to get updates on your shares.'
|
||||
answer = 'Your ID/Authentication Code is: [' + str(message.from_user.id) + ']. Enter this code in the settings on ' + os.getenv("WEBSITE_URL") + ' to get updates on your shares.'
|
||||
bot.reply_to(message, answer)
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ def update_for_user(message):
|
||||
my_portfolio = p_my_handler.get_user_portfolio(p_user_id)
|
||||
|
||||
if my_portfolio == None: # true if user is not registered
|
||||
bot.send_message(chat_id=p_user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("APP_URL"))
|
||||
bot.send_message(chat_id=p_user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("WEBSITE_URL"))
|
||||
return
|
||||
|
||||
my_user = p_my_handler.get_user(p_user_id)
|
||||
@@ -240,7 +240,7 @@ def update_for_user(message):
|
||||
my_update_message = f'{share_fetcher.get_share_information_markdown(share_symbols[i])}\ncount: {amounts}\nTotal: {hf.make_markdown_proof(round(float(my_price) * float(share_amounts[i]), 2))} EUR'
|
||||
bot.send_message(chat_id=p_user_id, text=my_update_message, parse_mode="MARKDOWNV2")
|
||||
else:
|
||||
send_to_user("No shares found for your account. Check " + os.getenv("APP_URL") + " to change your settings and add shares.", pUser_id=p_user_id)
|
||||
send_to_user("No shares found for your account. Check " + os.getenv("WEBSITE_URL") + " to change your settings and add shares.", pUser_id=p_user_id)
|
||||
|
||||
|
||||
def send_to_user(pText, pUser_id):
|
||||
@@ -294,7 +294,7 @@ def send_all_news(message):
|
||||
keywords = api_handler.get_user_keywords(user_id) # get keywords of user
|
||||
|
||||
if keywords == None: # true if user is not registered
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("APP_URL"))
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("WEBSITE_URL"))
|
||||
return
|
||||
|
||||
if not keywords: # true if user is registered but does not have any keywords
|
||||
@@ -330,7 +330,7 @@ def send_news(message):
|
||||
keywords = api_handler.get_user_keywords(user_id) # get keywords of user
|
||||
|
||||
if keywords == None: # true if user is not registered
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("APP_URL"))
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("WEBSITE_URL"))
|
||||
return
|
||||
|
||||
if not keywords: # true if user is registered but does not have any keywords
|
||||
@@ -375,7 +375,7 @@ def store_keyword(message):
|
||||
if status == 200: # statuscode 200 means keyword was added successfully without errors
|
||||
bot.send_message(chat_id=user_id, text=f'Keyword "{keyword}" added.') # duplicate keywords are denied by Database, so no need to check for that here
|
||||
else:
|
||||
bot.send_message(chat_id=user_id, text=f'Keyword "{keyword}" could not be stored. Make sure to connect your telegram id (/id) on {os.getenv("APP_URL")} (statuscode {status})')
|
||||
bot.send_message(chat_id=user_id, text=f'Keyword "{keyword}" could not be stored. Make sure to connect your telegram id (/id) on https://gruppe1.testsites.info (statuscode {status})')
|
||||
|
||||
|
||||
@bot.message_handler(commands=['removekeyword', 'Removekeyword']) # /removekeyword -> remove keyword from user
|
||||
@@ -417,7 +417,7 @@ def send_keywords(message):
|
||||
keywords = api_handler.get_user_keywords(user_id) # get keywords of user
|
||||
|
||||
if keywords == None: # true if user is not registered
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("APP_URL"))
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("WEBSITE_URL"))
|
||||
return
|
||||
|
||||
if not keywords: # true if user is registered but does not have any keywords
|
||||
@@ -513,7 +513,7 @@ def send_interval(message):
|
||||
user_id = int(message.from_user.id)
|
||||
user_data = api_handler.get_user(user_id) # get cron interval of user (stored in user data)
|
||||
if user_data == None: # true if user is not registered in DB
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("APP_URL") + ' and set an interval with /setinterval')
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("WEBSITE_URL") + ' and set an interval with /setinterval')
|
||||
return
|
||||
else: # send interval
|
||||
interval = str(user_data['cron']) # get cron from user data
|
||||
@@ -538,7 +538,7 @@ def send_transactions(message):
|
||||
transactions = api_handler.get_user_transactions(user_id) # get transactions of user
|
||||
|
||||
if transactions == None: # true if user does not exist
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("APP_URL"))
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("WEBSITE_URL"))
|
||||
return
|
||||
|
||||
if not transactions: # true if user has no transactions
|
||||
@@ -571,9 +571,9 @@ def send_shares(message):
|
||||
shares = api_handler.get_user_shares(user_id) # get shares of user
|
||||
|
||||
if shares == None: # true if user does not exist
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("APP_URL"))
|
||||
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on ' + os.getenv("WEBSITE_URL"))
|
||||
elif not shares: # true if user has no shares
|
||||
bot.send_message(chat_id=user_id, text='You do not have any shares. Add shares on ' + os.getenv("APP_URL"))
|
||||
bot.send_message(chat_id=user_id, text='You do not have any shares. Add shares on ' + os.getenv("WEBSITE_URL"))
|
||||
else:
|
||||
for element in shares:
|
||||
bot.send_message(chat_id=user_id, text=share_fetcher.get_share_information_markdown(element), parse_mode="MARKDOWNV2")
|
||||
|
@@ -156,7 +156,7 @@ def update_for_user(p_user_id, p_my_handler):
|
||||
my_update_message = f'{share_fetcher.get_share_information_markdown(share_symbols[i])}\ncount: {hf.make_markdown_proof(share_amounts[i])}\nTotal: {hf.make_markdown_proof(round(float(my_price) * float(share_amounts[i]), 2))} EUR'
|
||||
bot.send_message(chat_id=p_user_id, text=my_update_message, parse_mode="MARKDOWNV2")
|
||||
else:
|
||||
send_to_user("No shares found for your account. Check " + os.getenv("APP_URL") + " to change your settings and add shares.", pUser_id=p_user_id)
|
||||
send_to_user("No shares found for your account. Check " + os.getenv("WEBSITE_URL") + " to change your settings and add shares.", pUser_id=p_user_id)
|
||||
|
||||
if len(shares) != 0: # Send updates on watchlist shares if existing
|
||||
send_to_user("Your watchlist shares:", pUser_id=p_user_id)
|
||||
|
@@ -8,4 +8,4 @@ croniter~=1.3.4
|
||||
tzlocal==2.1
|
||||
investpy~=1.0.8
|
||||
pandas~=1.4.1
|
||||
currencyconverter~=0.17.1
|
||||
currencyconverter~=0.16.12
|
Reference in New Issue
Block a user