* __new__: `diaspy.people.User._fetchstream()` method,
+* __upd__: `diaspy.connection.Connection.login()` modifies connection object in-place **and** returns it (this allows more fluent API),
+* __upd__: `diaspy.connection.Connection.login()` no longer returns status code (if login was unsuccessful it'll raise an exception),
+* __upd__: `diaspy.connection.Connection._login()` no longer returns status code (if login was unsuccessful it'll raise an exception),
+
----
allow_redirects=False)
if request.status_code != 302:
raise errors.LoginError('{0}: login failed'.format(request.status_code))
- return request.status_code
def login(self, remember_me=1):
"""This function is used to log in to a pod.
self._login_data['user[remember_me]'] = remember_me
status = self._login()
self._login_data = {}
- return status
+ return self
def logout(self):
"""Logs out from a pod.