def __init__(self, token, fromDate='', toDate='', ids=[], user_ids=[]): NodeList.__init__(self, token) request = "leave?" if not fromDate == '' and not toDate == '': request += "from={}&to={}".format(fromDate, toDate) if not id == []: request += "&ids={}".format(",".join(ids)) if not user_ids == []: request += "&user_ids={}".format(",".join(user_ids)) self.fetch(request=request, childClass=Leave)
def __init__(self, token, fromDate='', toDate='', ids=[], user_ids=[]): NodeList.__init__(self, token) request = "unavailability?" if not fromDate == '' and not toDate == '': request += "from={}&to={}".format(fromDate, toDate) if not id == []: request += "&ids={}".format(",".join(ids)) user_ids = [str(id) for id in user_ids] if not user_ids == []: request += "&user_ids={}".format(",".join(user_ids)) self.fetch(request=request, childClass=Unavailability)
def __init__(self, ids=[], show_costs=False, scheduleListData=None): NodeList.__init__(self) if scheduleListData: self.fetch(data=scheduleListData, childClass=Schedule) return request = "schedules" if not ids == []: request += "&ids={}".format(",".join(ids)) if show_costs: request += "&show_costs=true" self.fetch(request=request, childClass=Schedule)
def __init__(self, token): NodeList.__init__(self, token) request = "award_tags" self.fetch(request=request, childClass=Award)
def __init__(self): NodeList.__init__(self) request = "departments" self.fetch(request=request, childClass=Department)
def __init__(self, token): NodeList.__init__(self, token) self.fetch(request="roles", childClass=Role)
def __init__(self): NodeList.__init__(self) self.fetch(request="shifts", childClass=Shift)
def __init__(self, token): NodeList.__init__(self, token) request = "devices" self.fetch(request=request, childClass=Device)