src/foggycam.py
def login(self):
        """Performs user login to get the website_2 cookie."""

        print ('INFO: Performing user login...')

        post_data = {'access_token':self.nest_access_token}
        post_data = urllib.parse.urlencode(post_data)
        binary_data = post_data.encode('utf-8')

        print ("INFO: Auth post data")
        print (post_data)

        request = urllib.request.Request(self.nest_api_login_url, data=binary_data)
        request.add_header('Content-Type', 'application/x-www-form-urlencoded')

        response = self.merlin.open(request)
        session_data = response.read()

        print (session_data)
Performs user login to get the website_2 cookie.
Performs user login to get the website_2 cookie.
Performs user login to get the website_2 cookie .
def login(self):
        print ('INFO: Performing user login...')
        post_data = {'access_token':self.nest_access_token}
        post_data = urllib.parse.urlencode(post_data)
        binary_data = post_data.encode('utf-8')
        print ("INFO: Auth post data")
        print (post_data)
        request = urllib.request.Request(self.nest_api_login_url, data=binary_data)
        request.add_header('Content-Type', 'application/x-www-form-urlencoded')
        response = self.merlin.open(request)
        session_data = response.read()
        print (session_data)
def login ( self ) : print ( 'INFO: Performing user login...' ) post_data = { 'access_token' : self . nest_access_token } post_data = urllib . parse . urlencode ( post_data ) binary_data = post_data . encode ( 'utf-8' ) print ( "INFO: Auth post data" ) print ( post_data ) request = urllib . request . Request ( self . nest_api_login_url , data = binary_data ) request . add_header ( 'Content-Type' , 'application/x-www-form-urlencoded' ) response = self . merlin . open ( request ) session_data = response . read ( ) print ( session_data )
Performs user login to get the website_2 cookie.
Performs user login to get the website_2 cookie .
"""Performs user login to get the website_2 cookie."""
self