Skip to content

Commit

Permalink
Merge pull request #23 from Achaak/fix/get-item
Browse files Browse the repository at this point in the history
Fix/get item
  • Loading branch information
Achaak authored Jul 10, 2023
2 parents 1e3d22f + 6c55fd1 commit 14b71d1
Show file tree
Hide file tree
Showing 22 changed files with 1,203 additions and 663 deletions.
14 changes: 13 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
PORT: 3000
PORT=3000

# API
CREDENTIAL_EMAIL=
POLLING_INTERVAL_IN_MS=30000
AUTHENTICATION_INTERVAL_IN_MS=3600000

# Notifications
NOTIFICATIONS_CONSOLE_CLEAR=true
NOTIFICATIONS_CONSOLE_ENABLED=false
NOTIFICATIONS_DESKTOP_ENABLED=false
NOTIFICATIONS_TELEGRAM_ENABLED=false
NOTIFICATIONS_TELEGRAM_BOT_TOKEN="BOT TOKEN"
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/.storage
/node_modules
/config/config.js
/store/data.json
/dist

# debug
Expand Down
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"cSpell.words": [
"Achaak",
"isequal",
"togoodtogobot",
"toogoodtogo"
]
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.3.0] - 2023-07-10

### Changed
- Fix login and favorites of favorites retrieval
- Update dependencies
- Convert config.json file to .env file

## [1.2.0] - 2022-03-07

Expand Down
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TooGooToGo-Bot
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.
This one will warn you thanks to Telegram or Windows notifications.

## Installation
Download and install the latest Node.js version:
Expand All @@ -18,14 +18,9 @@ Enter the repository:
cd toogoodtogo-bot/
```

Make a copy of the config sample file and insert your parameters:
Make a copy of the env sample file and insert your parameters:
```
cd config && cp config.default.js config.js
```

Return at the root
```
cd ..
cp .env .env.local
```

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

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

3. After created the bot. Take the token access and put in the config file.

4. Your bot is now ready. Multiple user can use it to get your favorite stocks avalaible.
4. Your bot is now ready. Multiple users can use it to get their favorite stocks available.

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

Expand Down Expand Up @@ -114,4 +108,4 @@ pm2 attach your_process_id
## Credit
https://github.com/marklagendijk/node-toogoodtogo-watcher

Thanks for the API path and some informations.
Thanks for the API path and some information.
26 changes: 0 additions & 26 deletions config/config.default.js

This file was deleted.

23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toogoodtogo-bot",
"version": "1.1.0",
"version": "1.3.0",
"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.",
"exports": "./dist/src/index.js",
"type": "module",
Expand All @@ -20,21 +20,22 @@
"homepage": "https://github.com/Achaak/toogoodtogo-bot#readme",
"license": "ISC",
"dependencies": {
"got": "^12.5.1",
"got-scraping": "^3.2.11",
"dotenv": "^16.3.1",
"got-scraping": "^3.2.13",
"lodash.isequal": "^4.5.0",
"module-alias": "^2.2.2",
"nconf": "^0.12.0",
"module-alias": "^2.2.3",
"node-notifier": "^10.0.1",
"nodemon": "^2.0.20",
"telegraf": "^4.10.0"
"nodemon": "^2.0.22",
"telegraf": "^4.12.2",
"tough-cookie": "^4.1.3",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/lodash.isequal": "^4.5.6",
"@types/nconf": "^0.10.3",
"@types/node": "^18.8.3",
"@types/node-notifier": "^8.0.0",
"tslint": "^6.1.3",
"typescript": "^4.8.4"
"@types/node": "^20.3.2",
"@types/node-notifier": "^8.0.2",
"@types/tough-cookie": "^4.0.2",
"typescript": "^5.1.3"
}
}
Loading

0 comments on commit 14b71d1

Please sign in to comment.