Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
    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)
Beispiel #4
0
 def __init__(self, token):
     NodeList.__init__(self, token)
     request = "award_tags"
     self.fetch(request=request, childClass=Award)
Beispiel #5
0
 def __init__(self):
     NodeList.__init__(self)
     request = "departments"
     self.fetch(request=request, childClass=Department)
Beispiel #6
0
 def __init__(self, token):
     NodeList.__init__(self, token)
     self.fetch(request="roles", childClass=Role)
Beispiel #7
0
 def __init__(self):
     NodeList.__init__(self)
     self.fetch(request="shifts", childClass=Shift)
Beispiel #8
0
 def __init__(self, token):
     NodeList.__init__(self, token)
     request = "devices"
     self.fetch(request=request, childClass=Device)