def get_cloud_notes(url, username, token, *args, **kwargs): data = { 'username': username, 'token': token, 'page_id': '1', 'page_size': '5000' } return air_api().post(url, data=data)
def register(username, password, again_pwd, *args, **kwargs): '''注册用户. ''' headers = {'User-Agent': 'AirMemo'} data = { 'username': username, 'password': password, 'again_password': again_pwd } return air_api().post(url, data=data, headers=headers)
def login(url,username, password,*args,**kwargs): """request login api """ # cryptograph_password() data = {'username': username, 'password': cryptograph_text(password, 'password')} return air_api().post(url, data=data)
def check_login(url,username, token,*args,**kwargs): data = { "username":username, "token":token } return air_api().post(url, data=data)
def logout(username): result = check_local_status() return air_api().post(url,data=result)