MobileBlur

Diff
Login

Differences From Artifact [a487a766ef]:

To Artifact [df40c3d1a1]:


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
        Login as an existing user.
        If a user has no password set, you cannot just send any old password. 
        Required parameters, username and password, must be of string type.
        '''

        url = nb_url + 'api/login'
        results = requests.post(url, data={"username": username, "password": password})
        print "results.cookies =", results.cookies
        print type(results.cookies)
        self.cookies = results.cookies
        results = simplejson.loads(results.content)
        if results["authenticated"] is False:
            raise Exception("The newsblur credentials you provided are invalid")
        return results

    def logout(self, ):







<
<







19
20
21
22
23
24
25


26
27
28
29
30
31
32
        Login as an existing user.
        If a user has no password set, you cannot just send any old password. 
        Required parameters, username and password, must be of string type.
        '''

        url = nb_url + 'api/login'
        results = requests.post(url, data={"username": username, "password": password})


        self.cookies = results.cookies
        results = simplejson.loads(results.content)
        if results["authenticated"] is False:
            raise Exception("The newsblur credentials you provided are invalid")
        return results

    def logout(self, ):