olijeffers0n / MySchedule.py

An API wrapper for the McDonald's Schedule platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MySchedule.py

Description

This is an API wrapper for the McDonald's MySchedule website.

Usage:

Install with:

pip install MySchedule.py

Getting Shifts

from schedule import ScheduleAPI
from datetime import datetime

api = ScheduleAPI("USERID", "PASSWORD")
api.login()
print(api.get_shifts_for_date(datetime.now()))

This will print out the shifts for the current week.

Getting Timecard

from schedule import ScheduleAPI

api = ScheduleAPI("USERID", "PASSWORD")
api.login()

timecard = api.get_timecard()

for shift in timecard:
    print(f"{shift.date} Breakdown:")
    print(f"Duration Clocked In: {shift.time_clocked_in}")
    print(f"Duration Clocked Out: {shift.time_clocked_out}")

This will print a breakdown of each shift's timecard and how long you were clocked in and out for.

About

An API wrapper for the McDonald's Schedule platform

License:MIT License


Languages

Language:Python 100.0%