Esempio n. 1
0
    def __init__(self):
        """Init the connexion to Dropbox.

        Returns:
        The Dropbox client.
        """
        Provider.__init__(self, 'dropbox')
        self.getToken()
Esempio n. 2
0
 def __init__(self, resource_type):
     '''
     Constructor
     
     @see:  nublic_resource.Provider.__init__
     '''
     Provider.__init__(self, resource_type)
     setup_all(create_tables=True)
Esempio n. 3
0
    def __init__(self):
        """Init the connexion to Google Drive.

        A credentials file is used to store the token and to renew it.

        Returns:
            The drive service.
        """

        Provider.__init__(self, 'googledrive')
Esempio n. 4
0
 def getNewToken(self):
     """ Get a new token for a new app """
     Provider.__init__(self, 'dropbox')
     print 'test de connexion a ' + self.provider_name
     flow = dropbox.client.DropboxOAuth2FlowNoRedirect(
         self.app_key, self.app_secret)
     r = requests.get(flow.start())
     if r.status_code == 200:
         print "url:", flow.start()
         print "Please authorize in the browser. After you're done, press enter."
         auth_code = raw_input().strip()
         access_token, _ = flow.finish(auth_code)
         config = ConfigParser.ConfigParser()
         config.readfp(open('conf.ini'))
         config.set('dropbox', 'token', access_token)
     else:
         return False
     return True
 def __init__(self, *args, **kwds):
     self._trovebox = trovebox.Trovebox()
     self._photo_count = None
     Provider.__init__(self, *args, **kwds)
 def __init__(self, *args, **kwds):
     self._trovebox = trovebox.Trovebox()
     self._photo_count = None
     Provider.__init__(self, *args, **kwds)
 def __init__(self):
     Provider.__init__(self)
Esempio n. 8
0
 def __init__(self, name="Ext.app.REMOTING_API", autoadd=True):
     Provider.__init__(self, name="Ext.app.REMOTING_API", autoadd=True)
     self.forms = {}