Ejemplo n.º 1
0
 def create_1on1(self, token, receiver_id):
     url = "/api/coachingSessions"
     payload = '{ "appointmentDate": "date_time", "receiver": { \"id\": receiver_id }}'
     payload = payload.replace('date_time',
                               UtilService(self._obj).getDateTime(days=2))
     payload = payload.replace('receiver_id', receiver_id)
     return RequestService(self._obj).request("POST", url, token, payload)
Ejemplo n.º 2
0
 def create_sendStars(self, token, receiver_id):
     url = "/api/rewards/multiple-receivers"
     payload = '{"message": "message_content", "pointCount": 1, "receiverUsers":[{"id": receiver_id}], "reasonId": 1, "seen": true}'
     payload = payload.replace('message_content',
                               UtilService(self._obj).getDateTime())
     payload = payload.replace('receiver_id', receiver_id)
     return RequestService(self._obj).request("POST", url, token, payload)
Ejemplo n.º 3
0
 def create_course_assignment(self, token, receiver):
     url = '/api/assignments'
     payload = "{ \"assignees\": [ { \"id\": receiver } ], \"lessons\": [ { \"id\": 174 } ], \"title\": \"title_name\"}"
     payload = payload.replace("title_name",
                               UtilService(self._obj).getDateTime())
     payload = payload.replace("receiver", receiver)
     return RequestService(self._obj).request("POST", url, token, payload)
Ejemplo n.º 4
0
 def get_channel_user_ids(self, channel):
     url = f"/api/announcementChannel/{channel}/members?active=true"
     res = RequestService(self._obj).request('GET', url, self._obj.token)
     user_ids = []
     for i in range(len(res)):
         user_ids.append(res[i]["id"])
     return user_ids
Ejemplo n.º 5
0
 def get_channel_login_list(self, channel):
     url = f"/api/announcementChannel/{channel}/members?active=true"
     res = RequestService(self._obj).request('GET', url, self._obj.token)
     login = []
     for i in range(len(res)):
         login.append(res[i]["login"])
     return login
Ejemplo n.º 6
0
 def attachmentUpload(self, channel):
     url = f"/api/announcementplus/{channel}/attachments"
     files = {"file": ("DigitalTranfromation(5+BJC).jpg", open("DigitalTranfromation(5+BJC).jpg", 'rb'))}
     header = {'X-Auth-Token': ""}
     res =  RequestService(self._obj).request('POST', url, headers=header, files=files)
     uuid = res["uuid"]
     print(uuid)
Ejemplo n.º 7
0
 def put_user_to_predefined_group(self, group_members):
     url = '/api/predefined-groups'
     payload = '{"id":355,"name":"Taipei Office","totalMember":3,"criteria":[],"privateGroup":false,\
     "subGroupIds":[],"members":[' + group_members + '],"evaluationStatus":"UP_TO_DATE"}'
     return RequestService(self._obj).request("PUT",
                                              url,
                                              self._obj.token,
                                              data=payload)
Ejemplo n.º 8
0
 def create_announcement(self, channel, uuid):
     url = f"/api/announcementplus/{channel}/messages"
     payload = '{"subject":"Business Transformation Survey-my_count","message":"MyMessage","channel":"_channel_",\
         "attachments":[{"fileName":"DigitalTranfromation.jpg","contentType":"image/jpeg","progres":100,"extension":"jpg","completed":true,\
         "uuid":"_uuid_"}],"author":{},"enableAck":true}'
     payload = payload.replace("_uuid_", uuid)
     payload = payload.replace("_channel_", channel)
     return RequestService(self._obj).request("POST", url, data=payload, headers=self._obj.headers)
Ejemplo n.º 9
0
 def create_taskAssignment(self, token, receiver_id):
     url = "/api/task-assignments"
     payload = '{ "assignees": [ { "id": receiver_id } ], "title": "title_name", "dueDate": "target_date"}'
     payload = payload.replace('title_name',
                               UtilService(self._obj).getDateTime())
     payload = payload.replace('target_date',
                               UtilService(self._obj).getDate())
     payload = payload.replace('receiver_id', receiver_id)
     return RequestService(self._obj).request("POST", url, token, payload)
Ejemplo n.º 10
0
 def create_survey(self, token):
     url = "/api/surveys"
     payload = '{"title":"title_name","surveyType":"GENERAL","status":"DRAFT","isAnonymous":true,"startDate":"start_date","endDate":"end_date"}'
     payload = payload.replace("title_name",
                               UtilService(self._obj).getDateTime())
     payload = payload.replace("start_date",
                               UtilService(self._obj).getDate())
     payload = payload.replace("end_date", UtilService.getDate(1))
     return RequestService(self._obj).request("POST", url, token, payload)
Ejemplo n.º 11
0
    def create_course_permission(self, token, id):
        url = '/api/acl/permissions'
        payload = '{"objectId":course_id,"objectEntryType":{"objectTypeId":5,"objectTypeName":""},"companyOverridden":true,"accessors":[{"accessorId":439,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":456,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":424,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":419,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":425,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":56,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":73,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":55,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":8,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":50,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":1,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":3,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":4,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":2,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":48,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":52,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":5,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":6,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":7,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":440,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":459,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":418,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":434,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":416,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":413,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":415,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":57,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":60,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":59,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":16,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":51,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":9,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":11,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":61,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":12,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":10,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":49,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":53,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":13,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":14,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":15,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":433,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":400,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":414,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":417,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":58,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":54,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":38,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":17,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":18,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":19,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":432,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":403,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":460,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":435,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":63,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":20,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":22,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":21,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":442,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":407,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":412,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":34,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":44,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":41,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":454,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":420,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":62,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":26,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":27,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":39,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":42,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":23,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":24,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":25,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":46,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":461,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":455,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":409,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":411,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":410,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":64,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":65,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":66,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":67,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":68,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":69,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":70,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":71,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":72,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":83,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":82,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":80,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":77,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":76,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":79,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":81,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":78,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":84,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":75,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":74,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":87,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":85,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":105,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":86,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":88,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":106,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":92,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":91,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":108,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":90,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":107,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":89,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":102,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":104,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":103,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":101,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":100,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":99,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":98,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":97,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":96,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":95,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":94,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":109,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":93,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":115,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":114,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":113,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":112,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":111,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":123,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":110,"granting":false,"permissions":[],"userAccessor":false},\
                    {"accessorId":122,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":445,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":120,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":126,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":119,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":116,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":121,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":124,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":118,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":117,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":127,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":125,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":130,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":136,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":129,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":135,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":128,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":143,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":142,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":141,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":140,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":138,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":134,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":139,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":133,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":132,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":137,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":131,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":146,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":145,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":159,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":144,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":158,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":152,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":151,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":148,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":150,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":147,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":149,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":160,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":162,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":184,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":157,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":155,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":153,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":156,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":154,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":161,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":163,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":167,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":166,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":168,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":165,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":169,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":164,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":173,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":185,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":172,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":171,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":174,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":170,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":187,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":176,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":175,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":186,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":188,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":180,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":183,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":178,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":177,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":181,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":179,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":189,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":182,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":206,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":194,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":190,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":193,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":192,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":195,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":207,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":191,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":196,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":205,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":200,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":199,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":198,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":209,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":202,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":201,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":208,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":197,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":203,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":213,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":227,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":212,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":211,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":210,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":204,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":218,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":217,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":216,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":215,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":229,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":230,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":214,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":228,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":224,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":232,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":219,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":222,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":221,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":220,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":223,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":233,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":231,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":239,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":238,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":237,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":236,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":235,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":226,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":240,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":225,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":234,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":241,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":245,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":246,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":242,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":254,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":244,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":243,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":252,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":253,"granting":false,"permissions":[],"userAccessor":false},\
                    {"accessorId":247,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":250,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":249,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":251,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":248,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":256,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":255,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":262,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":275,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":261,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":260,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":258,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":259,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":274,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":276,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":257,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":263,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":264,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":277,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":266,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":269,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":270,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":268,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":271,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":267,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":273,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":272,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":265,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":392,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":284,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":283,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":282,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":279,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":278,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":281,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":285,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":286,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":280,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":287,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":293,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":295,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":300,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":290,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":296,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":294,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":289,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":291,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":288,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":301,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":292,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":304,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":309,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":303,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":299,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":298,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":305,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":297,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":307,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":308,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":306,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":302,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":317,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":316,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":314,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":313,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":315,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":312,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":311,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":310,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":318,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":393,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":325,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":324,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":323,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":322,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":321,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":320,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":319,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":337,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":327,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":326,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":338,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":328,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":329,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":330,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":394,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":336,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":335,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":340,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":334,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":333,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":339,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":332,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":341,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":331,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":342,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":343,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":395,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":350,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":349,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":348,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":347,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":351,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":346,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":353,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":352,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":345,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":344,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":438,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":355,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":354,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":437,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":396,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":360,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":359,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":361,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":357,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":366,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":356,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":358,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":397,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":370,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":369,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":365,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":364,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":363,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":362,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":368,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":367,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":371,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":373,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":372,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":398,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":379,"granting":false,"permissions":[],"userAccessor":false},\
                    {"accessorId":378,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":377,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":376,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":375,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":374,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":380,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":466,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":469,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":391,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":399,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":390,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":385,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":381,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":384,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":383,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":387,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":386,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":382,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":388,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":389,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":468,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":426,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":427,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":408,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":430,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":444,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":465,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":502,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":446,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":450,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":480,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":504,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":447,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":479,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":448,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":475,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":449,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":521,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":462,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":495,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":451,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":503,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":520,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":463,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":452,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":497,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":473,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":506,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":517,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":453,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":496,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":478,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":481,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":498,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":493,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":470,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":492,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":482,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":484,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":490,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":486,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":514,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":515,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":516,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":494,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":485,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":487,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":491,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":509,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":501,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":510,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":499,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":505,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":507,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":512,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":513,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":518,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":530,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":523,"granting":false,"permissions":[],"userAccessor":false},{"accessorId":528,"granting":false,"permissions":[],"userAccessor":false}]}'

        payload = payload.replace('course_id', str(id))
        return RequestService(self._obj).request("PUT", url, self._obj.token,
                                                 payload)
Ejemplo n.º 12
0
    def submit_survey(self, token):
        url = "/api/me/survey-assignments/2915"
        payload = '{"id":null,"startDate":"2020-02-12T21:41:19.938Z","finishDate":"2020-02-12T21:43:38.758Z","duration":137358,"result":[\
        {"questionId":7758,"title":"New Question","answer":[_value],"type":"likert","metaData":{"originalType":"likert"},"answerText":[_text],"duration":2733,"score": _index,"version":2},\
        {"questionId":7759,"title":"New Question","answer":[_value],"type":"checkbox","metaData":{"originalType":"checkbox"},"answerText":[_text],"duration":2622,"score":null,"version":2},\
        {"questionId":7760,"title":"New Question","answer":[_value],"type":"radio","metaData":{"originalType":"radio"},"answerText":[_text],"duration":2864,"score":4,"version":2},\
        {"questionId":7761,"title":"New Question","answer":[_value],"type":"scale","metaData":{"originalType":"scale"},"answerText":[_text],"duration":3997,"score":1,"version":2},\
        {"questionId":7763,"title":"New Question","answer":[],"type":"freetext","metaData":{"originalType":"freetext"},"answerText":[_text],"duration":125142,"score":null,"version":2}]}'

        _index, _value, _text = self.answer_survey_question()
        payload = payload.replace('_value', _value)
        payload = payload.replace('_text', _text)
        payload = payload.replace('_index', str(_index))
        return RequestService(self._obj).request("POST",
                                                 url,
                                                 token,
                                                 data=payload)
Ejemplo n.º 13
0
    def create_users(self, loginId):
        url = "/api/users"
        # payload = '{"activated":true,"authorities":["ROLE_USER"],"login":"******","employeeId":"username","firstName":"username", \
        #     "lastName":"chen","mobilePhone":null,"phoneCountryCode":null,"userProfile":{"jobTitle":{"id":1,"name":"Dev L1","department":{}}, \
        #     "department":{"id":1,"name":"Dev","companyId":1},"branches":[{"id":2}],"branchesEntity":{"_collection":[{"id":2}]}, \
        #     "country":{},"userGroupsEntity":{"_collection":[]},"userGroups":[],"company":{"id":1},"supervisor":null},"langKey":"en-US", \
        #     "password":"******","displayName":"username","tags":[]}'
        payload = '{"activated":true,"authorities":["ROLE_USER"],"login":"******","employeeId":"username",\
            "firstName":"username","lastName":"chen","userProfile":{"jobTitle":{"id":11,"name":"Senior Technician",\
            "titleOrder":1,"department":{}},"department":{"id":2985,"name":"Private1","companyId":1},"branches":[{"id":187}],\
            "branchesEntity":{"_collection":[{"id":187}]},"company":{"id":1},\
            "supervisor":{"id":2837},"businessUnit":{"id":187}},"langKey":"en-US","password":"******","displayName":"username"}'

        payload = payload.replace('username', loginId)
        return RequestService(self._obj).request("POST",
                                                 url,
                                                 self._obj.token,
                                                 data=payload)
Ejemplo n.º 14
0
 def remove_1on1(self, token, id):
     url = f"/api/me/coachingSessions/{str(id)}/status/cancel"
     return RequestService(self._obj).request("POST", url, token)
Ejemplo n.º 15
0
 def publish_course(self, token, id):
     url = f'/api/courses/{str(id)}/updateStatus'
     payload = "1"
     return RequestService(self._obj).request("PUT", url, token, payload)
Ejemplo n.º 16
0
 def get_1on1_today(self, token):
     url = '/api/me/coachingSessions/today'
     return RequestService(self._obj).request("GET", url, token)
Ejemplo n.º 17
0
 def get_1on1_missing(self, token):
     url = '/api/me/coachingSessions/missing?size=1000'
     return RequestService(self._obj).request("GET", url, token)
Ejemplo n.º 18
0
 def accept_1on1(self, token, id):
     url = f"/api/me/coachingSessions/{str(id)}/status/accept"
     return RequestService(self._obj).request("POST", url, token)
Ejemplo n.º 19
0
 def get_1on1_upcoming(self, token):
     url = "/api/me/coachingSessions/upcoming?sort=appointmentDate%2CDESC&size=10&page=0"
     return RequestService(self._obj).request("GET", url, token)
Ejemplo n.º 20
0
 def create_anncouncement(self, token, channel):
     url = f"/api/announcementplus/{channel}/messages"
     payload = '{"subject":"TPE QA-date_time","message":"MyMessage-date_time","channel":"channel","completed":true}]"enableAck":true}'
     payload = payload.replace("date_time",
                               UtilService(self._obj).getDateTime())
     return RequestService(self._obj).request("POST", url, token, payload)
Ejemplo n.º 21
0
 def update_lesson_completed(self, token, lesson_id):
     url = f'/api/me/trainingHistories'
     payload = '{"lessonId": lesson_id,"trainingEventType":"LESSON_COMPLETED"}'
     payload = payload.replace('lesson_id', lesson_id)
     return RequestService(self._obj).request("POST", url, token, payload)
Ejemplo n.º 22
0
 def getUnreadCount(self, token):
     url = "/api/me/dashboard/announcement-unread-count"
     return RequestService(self._obj).request("GET", url, token)
Ejemplo n.º 23
0
 def get_offline_course(self, token):
     url = "/api/offlineTrainings?size=1&sort=id,desc&page=0"
     return RequestService(self._obj).request("GET", url, token)
Ejemplo n.º 24
0
 def publish_course_push_noti(self):
     url = '/api/courses/notification/notify-published-courses'
     return RequestService(self._obj).request("POST", url, self._obj.token)
Ejemplo n.º 25
0
 def GetWidgets(self, token):
     url, token = DashboardService(self._obj).get_widgets(token)
     return RequestService(self._obj).request("GET", url, token)
Ejemplo n.º 26
0
 def get_friend_list(self, login):
     url = f'/api/me/friends?searchTerm={login}&searchFields=firstName%2C%20lastName%2C%20login&sort=id%2Casc&size=100&page=0'
     return RequestService(self._obj).request("GET", url, self._obj.token)
Ejemplo n.º 27
0
 def create_scheduled_predefined_group(self, token, id):
     url = f'/api/courses/{str(id)}/scheduled-predefined-groups'
     payload = '{"content":[{"children":[{"id":404}],"startDate":"start_date","endDate":null}]}'
     payload = payload.replace('start_date',
                               UtilService(self._obj).getDate())
     return RequestService(self._obj).request("PUT", url, token, payload)
Ejemplo n.º 28
0
 def get_widgets(self, token):
     url = "/api/widgets"
     return RequestService(self._obj).request("GET", url, token)
Ejemplo n.º 29
0
 def publish_gift(self, token, status='false'):
     url = "/api/redemptionProducts/158/publish"
     payload = '{"published":status}'
     payload = payload.replace("status", status)
     return RequestService(self._obj).request("PUT", url, self._obj.token,
                                              payload)
Ejemplo n.º 30
0
 def update_lesson_progress(self, token, lesson_id, lesson_status):
     url = f'/api/me/trainingHistories'
     payload = '{"lessonId": lesson_id,"trainingEventType":"lesson_status"}'
     payload = payload.replace('lesson_id', lesson_id)
     payload = payload.replace('lesson_status', lesson_status)
     return RequestService(self._obj).request("POST", url, token, payload)