-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Big Refactor #25
Merged
Big Refactor #25
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will be used to determine how often the script should check for new flights (when login credentials are used).
The parent Flight Retriever class is responsible for holding all needed objects, such as the configuration, notification handler, and checkin scheduler. It also allows reservations to be scheduled directly or by JSON retrieved from an account. The Account Flight Retriever monitors an account every 24 hours (default, but can be adjusted). If new flights are found, it will schedule them using the Checkin Scheduler. This class is only instantiated when a username and password are provided.
This change relates to the recent additions of a Flight Retriever. Improves the readability of the class and adds documentation to further understand the functionality.
The CheckIn Scheduler will schedule flight check-ins from confirmation numbers. To schedule each flight's check in, it will use the CheckIn Handler.
This class handles a check in for a single flight. This logic was taken out of the Flight class, which is now just a class used to set the correct flight departure time.
This class makes it very easy to send any notification that would be helpful to the user.
Also delete Account now that it is unused
This script will now be versioned. I will also add a Changelog to document all the changes within the script.
A Changelog will make it easier to track new changes and give users a better idea of what is being done from version to version.
I love the changelog idea. Can I recommend using Releases along with it? It'll allow people to watch for release notifications. |
Yes, I am planning to use releases as well (with tags). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds many new functionalities to the script.
First, a big refactor was done on the code base to make execution flow much more practical (Thanks to @sdstolworthy for the proposed refactors)
Next, a new feature was added (first proposed in #10) that will continuously monitor the account (if login credentials are provided) for new flights, scheduling check-ins automatically.
Last, a Changelog was added along with versioning so users can get a better understanding of the changes that are happening. For now on, changes will be done on the
develop
branch and will only be pushed during to master during on a new release.I have tested this on a few flights and it has worked, but it would be great if others could also test their check-ins on this branch (
git pull && git checkout refactor
) and report their results in the comments.