Skip to content

Commit 14b71d1

Browse files
authored
Merge pull request #23 from Achaak/fix/get-item
Fix/get item
2 parents 1e3d22f + 6c55fd1 commit 14b71d1

22 files changed

+1203
-663
lines changed

.env

+13-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
PORT: 3000
1+
PORT=3000
2+
3+
# API
4+
CREDENTIAL_EMAIL=
5+
POLLING_INTERVAL_IN_MS=30000
6+
AUTHENTICATION_INTERVAL_IN_MS=3600000
7+
8+
# Notifications
9+
NOTIFICATIONS_CONSOLE_CLEAR=true
10+
NOTIFICATIONS_CONSOLE_ENABLED=false
11+
NOTIFICATIONS_DESKTOP_ENABLED=false
12+
NOTIFICATIONS_TELEGRAM_ENABLED=false
13+
NOTIFICATIONS_TELEGRAM_BOT_TOKEN="BOT TOKEN"

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/.storage
21
/node_modules
3-
/config/config.js
2+
/store/data.json
43
/dist
54

65
# debug

.vscode/settings.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"cSpell.words": [
3+
"Achaak",
4+
"isequal",
5+
"togoodtogobot",
6+
"toogoodtogo"
7+
]
8+
}

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
## [1.3.0] - 2023-07-10
8+
9+
### Changed
10+
- Fix login and favorites of favorites retrieval
11+
- Update dependencies
12+
- Convert config.json file to .env file
613

714
## [1.2.0] - 2022-03-07
815

README.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TooGooToGo-Bot
22
TooGooToGo-Bot is a tool to warn you about the availability of your favorite stores.
3-
This one will warn you thanks to Telegram or Window notifications.
3+
This one will warn you thanks to Telegram or Windows notifications.
44

55
## Installation
66
Download and install the latest Node.js version:
@@ -18,14 +18,9 @@ Enter the repository:
1818
cd toogoodtogo-bot/
1919
```
2020

21-
Make a copy of the config sample file and insert your parameters:
21+
Make a copy of the env sample file and insert your parameters:
2222
```
23-
cd config && cp config.default.js config.js
24-
```
25-
26-
Return at the root
27-
```
28-
cd ..
23+
cp .env .env.local
2924
```
3025

3126
Install the application:
@@ -73,10 +68,9 @@ docker run -p 3000:3000 -d <your desired username>/togoodtogobot
7368
1. Open a Telegram chat with BotFather and click the **/start** command.
7469

7570
2. Select the command **/newbot** and follow the instruction.
71+
After creating the bot. Take the token access and put it in the config file.
7672

77-
3. After created the bot. Take the token access and put in the config file.
78-
79-
4. Your bot is now ready. Multiple user can use it to get your favorite stocks avalaible.
73+
4. Your bot is now ready. Multiple users can use it to get their favorite stocks available.
8074

8175
5. Now, to start the notifications, send **/start** in your bot's conversation.
8276

@@ -114,4 +108,4 @@ pm2 attach your_process_id
114108
## Credit
115109
https://github.com/marklagendijk/node-toogoodtogo-watcher
116110

117-
Thanks for the API path and some informations.
111+
Thanks for the API path and some information.

config/config.default.js

-26
This file was deleted.

package.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "toogoodtogo-bot",
3-
"version": "1.1.0",
3+
"version": "1.3.0",
44
"description": "TooGooToGo-Bot is a tool to warn you about the availability of your favorite stores. This one will warn you thanks to Telegram or Window notifications.",
55
"exports": "./dist/src/index.js",
66
"type": "module",
@@ -20,21 +20,22 @@
2020
"homepage": "https://github.com/Achaak/toogoodtogo-bot#readme",
2121
"license": "ISC",
2222
"dependencies": {
23-
"got": "^12.5.1",
24-
"got-scraping": "^3.2.11",
23+
"dotenv": "^16.3.1",
24+
"got-scraping": "^3.2.13",
2525
"lodash.isequal": "^4.5.0",
26-
"module-alias": "^2.2.2",
27-
"nconf": "^0.12.0",
26+
"module-alias": "^2.2.3",
2827
"node-notifier": "^10.0.1",
29-
"nodemon": "^2.0.20",
30-
"telegraf": "^4.10.0"
28+
"nodemon": "^2.0.22",
29+
"telegraf": "^4.12.2",
30+
"tough-cookie": "^4.1.3",
31+
"zod": "^3.21.4"
3132
},
3233
"devDependencies": {
3334
"@types/lodash.isequal": "^4.5.6",
3435
"@types/nconf": "^0.10.3",
35-
"@types/node": "^18.8.3",
36-
"@types/node-notifier": "^8.0.0",
37-
"tslint": "^6.1.3",
38-
"typescript": "^4.8.4"
36+
"@types/node": "^20.3.2",
37+
"@types/node-notifier": "^8.0.2",
38+
"@types/tough-cookie": "^4.0.2",
39+
"typescript": "^5.1.3"
3940
}
4041
}

0 commit comments

Comments
 (0)