Giter VIP home page Giter VIP logo

automagic-walmart-schedule-tracker's Introduction

Automagic-Walmart-Schedule-Tracker

The main operations performed by this app are conducted in the SiteScraper class and the CalManager class. SiteScraper has only one entrance, Execute(), which uses a HttpClient to login to WalmartOne and returns the schedule html for HtmlAgilityPack to parse. The Execute() method returns a SiteScraperReturnObject that indicates the return status as well as any data( a list of Day objects).

The list that is returned by SiteScraper is then sent to the CalManager class via Execute() which also requires a SettingsObject. The SettingsObject holds all the settings for the app such as event colors, event title, etc.

The CalManager class also contains a few helper methods, such as ChangeTimeslot(): for changing a specific timeslot; GetCalendars(): for getting a list of all calendars on the device; GetEventCollection(): for retrieving all the events stored in the database; and DeleteTimeslot(): for deleting the given timeslot.

The app uses JobScheduler for running as a service, which activates immediately on toggling, followed by once per 3 hours. The job scheduler actually runs two services, the EventService and the ReminderService. EventService is the service which scrapes WalmartOne and adds/updates your calendar, ReminderService follows about 5 minutes later which updates all the events reminders. This route was needed because there is a race condition when using CalendarContract to add an event and then edit the reminder. If anyone has any other solutions feel free to let me know!

If you inspect the Day class, you can see that there are two DateTime properties for start and end. The BackupX property is set when the object is created or updated by the SiteScraper data, and is what is compared when checking the schedule in future transactions. The start/end properties without the Backup prefix are the displayed data. When a user updates a specific timeslot, only the start/end properties are adjusted preventing overwrite unless the shift is updated on WalmartOne.

Thanks for using my app! If you have any questions or concerns you can create an issue, or comment on the Reddit post!

automagic-walmart-schedule-tracker's People

Contributors

betweenmatt avatar kathy-wenzel-1961 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.