コード例 #1
0
 def _get_promoted(self, output=None):
     """
     this is an internal endpoint, not intended for customer use
     """
     requestor = RequestHandler(token=self.api_token, api_base=self.api_base)
     url = '{}get-promoted/'.format(self.instance_url())
     if output and hasattr(output, 'write') and callable(output.write):
         # print(self.instance_url())
         requestor.download_with_progressbar(url, label='Download Training')
     else:
         return requestor.request('get', url, None)