Beispiel #1
0
 def delete_user_lesson_completed(self, sso_session_id, service, lesson):
     authenticator = AuthenticatorNegotiator(sso_session_id=sso_session_id)
     url = self.endpoints['user_lesson_completed']
     return self.delete(url, {
         'service': service,
         'lesson': lesson
     },
                        authenticator=authenticator)
Beispiel #2
0
 def set_user_data(self, sso_session_id, data, name):
     url = self.endpoints['user_data']
     return self.post(url, {
         'data': data,
         'name': name
     },
                      authenticator=AuthenticatorNegotiator(
                          sso_session_id=sso_session_id))
Beispiel #3
0
 def get_user_page_views(self, sso_session_id, service, page):
     authenticator = AuthenticatorNegotiator(sso_session_id=sso_session_id)
     url = self.endpoints['user_page_views']
     return self.get(url, {
         'service': service,
         'page': page
     },
                     authenticator=authenticator)
Beispiel #4
0
 def set_user_questionnaire_answer(self, sso_session_id, service,
                                   question_id, answer):
     url = self.endpoints['user_questionnaire']
     return self.post(
         url,
         {
             'service': service,
             'question_id': question_id,
             'answer': answer
         },
         authenticator=AuthenticatorNegotiator(
             sso_session_id=sso_session_id),
     )
Beispiel #5
0
 def set_user_lesson_completed(self, sso_session_id, service, lesson_page,
                               lesson, module):
     authenticator = AuthenticatorNegotiator(sso_session_id=sso_session_id)
     url = self.endpoints['user_lesson_completed']
     return self.post(
         url,
         {
             'service': service,
             'lesson_page': lesson_page,
             'lesson': lesson,
             'module': module,
         },
         authenticator=authenticator,
     )
Beispiel #6
0
 def update_user_profile(self, sso_session_id, data):
     authenticator = AuthenticatorNegotiator(sso_session_id=sso_session_id)
     url = self.endpoints['user_update_profile']
     return self.patch(url, data, authenticator=authenticator)
Beispiel #7
0
 def get_oauth2_user_profile(self, bearer_token):
     return self.get(
         url=self.endpoints['oauth2_user_profile'],
         authenticator=AuthenticatorNegotiator(bearer_token=bearer_token))
Beispiel #8
0
 def get_user_questionnaire(self, sso_session_id, service):
     url = self.endpoints['user_questionnaire']
     return self.get(url, {'service': service},
                     authenticator=AuthenticatorNegotiator(
                         sso_session_id=sso_session_id))
Beispiel #9
0
 def retrieve_supplier(self, bearer_token=None, sso_session_id=None):
     authenticator = AuthenticatorNegotiator(bearer_token=bearer_token,
                                             sso_session_id=sso_session_id)
     return self.get(self.endpoints['supplier'],
                     authenticator=authenticator)