def register(self, password):
if len(password) < <NUM_LIT:8>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>params = {"<STR_LIT:name>": self.nick, "<STR_LIT:password>": password}<EOL>resp = self.conn.make_api_call("<STR_LIT>", params)<EOL>if "<STR_LIT:error>" in resp:<EOL><INDENT>raise RuntimeError(f"<STR_LIT>")<EOL><DEDENT>self.conn.make_call("<STR_LIT>", resp["<STR_LIT>"])<EOL>self.conn.cookies.update({"<STR_LIT>": resp["<STR_LIT>"]})<EOL>self.logged_in = True<EOL>
Registers the current user with the given password.