def api_modify_account(self, url, id, realname): headers = {'Content-Type': 'application/json'} data = { "action": "modifyone", "id": id, "newdata": { "realname": realname, } } session = GetSession().get_session() return session.put(url, json=data, headers=headers)
def api_ban_notice(self, url, id): headers = {'Content-Type': 'application/json'} data = {"action": "banone", "id": id} session = GetSession().get_session() return session.put(url, json=data, headers=headers)