-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide function to add Tracking numbers remotely #8
Comments
Sounds interesting |
What do you think about email? I was thinking about this a little bit and here's my proposal: Email is the only thing that comes to my mind that has the most common usage and the least amount of caveats; No service to make an account, no token, no fancy API to use and so on. Everybody has email and it is no problem to create a dedicated email address for this purpose i think. Just enter the imap credentials in the config and that should be it. The only real problem that comes to my mind is Spam. But we can make an option that only accepts mails from specific email addresses and/or with a specific subject for processing (this won't stop anybody to add tracking numbers with a fake mail header, but let's be honest - if someone does this to spam your mirror, we are not talking about "usual" spam anymore...). I was thinking about someting like this for the mail's content:
Example: From: [email protected] (accepted sender)
Additionally, currently used tracking numbers should be saved in a local file in the module's folder to survive a reboot of the mirror. Maybe a JSON file that has the same format as the If you are OK with this proposal, I will implement this and send a PR to you. :) P.S. for additional stuff:
|
The idea itself is good, but this adds unnecessary complexity to this module and is not reusable for anything else. According to me there should be another module e.g. notification forwarder. Which accepts input as you described before and then creates a specific notification and sends it to this module. This could be ADD_TRACKING, REMOVE_TRACKING, those two notifications would need to be implemented then in shipment tracking. The good part about this is that the logic of this module keeps kind of simple and the notification forwarder module can be extended to accept next to emails also http requests and other inputs. Also it can then be extended to parse other commands for other modules and in this way it is reusable. |
Ok, that sounds fine for me. I'm going to make such a module. We should then talk about the definition of the object that is transmitted via the notifications. I created a placeholder-repository here: |
It would be nice to have a function to remotely add Tracking numbers to this module.
For example by sending an email/notification/... to the mirror/module and then it adds the parcel automagically to the list.
I will think about a solution for this and try to implement it and send a PR if you'd like this as well.
(This could take some time since I'm currently writing my Master Thesis though)
The text was updated successfully, but these errors were encountered: