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