django_youtube/api.py
def authenticate(self, email=None, password=None, source=None):
        """
        Authenticates the user and sets the GData Auth token.
        All params are optional, if not set, we will use the ones on the settings, if no settings found, raises AttributeError
        params are email, password and source. Source is the app id

        Raises:
            gdata.service.exceptions.BadAuthentication
        """
        from gdata.service import BadAuthentication

        # Auth parameters
        Api.yt_service.email = email if email else settings.YOUTUBE_AUTH_EMAIL
        Api.yt_service.password = password if password else settings.YOUTUBE_AUTH_PASSWORD
        Api.yt_service.source = source if source else settings.YOUTUBE_CLIENT_ID
        try:
            Api.yt_service.ProgrammaticLogin()
            self.authenticated = True
        except BadAuthentication:
            raise ApiError(_("Incorrect username or password"))
def authenticate(self, email=None, password=None, source=None):
        from gdata.service import BadAuthentication

        # Auth parameters
        Api.yt_service.email = email if email else settings.YOUTUBE_AUTH_EMAIL
        Api.yt_service.password = password if password else settings.YOUTUBE_AUTH_PASSWORD
        Api.yt_service.source = source if source else settings.YOUTUBE_CLIENT_ID
        try:
            Api.yt_service.ProgrammaticLogin()
            self.authenticated = True
        except BadAuthentication:
            raise ApiError(_("Incorrect username or password"))
def authenticate ( self , email = None , password = None , source = None ) : from gdata . service import BadAuthentication # Auth parameters Api . yt_service . email = email if email else settings . YOUTUBE_AUTH_EMAIL Api . yt_service . password = password if password else settings . YOUTUBE_AUTH_PASSWORD Api . yt_service . source = source if source else settings . YOUTUBE_CLIENT_ID try : Api . yt_service . ProgrammaticLogin ( ) self . authenticated = True except BadAuthentication : raise ApiError ( _ ( "Incorrect username or password" ) )
Authenticates the user and sets the GData Auth token.
        All params are optional, if not set, we will use the ones on the settings, if no settings found, raises AttributeError
        params are email, password and source. Source is the app id

        Raises:
            gdata.service.exceptions.BadAuthentication
Authenticates the user and sets the GData Auth token . All params are optional if not set we will use the ones on the settings if no settings found raises AttributeError params are email password and source . Source is the app id