def text_fetched(text): data = json.loads(text) text_label.set_text(data['text']) for btn in data['buttons']: button = ui.Button(btn['text'], functools.partial(open_gold_link, btn['url'], btn.get('restart'))) buttons.add(button)
def text_fetched(text): data = json.loads(text) text_label.set_text(data['text']) for btn in data['buttons']: button = ui.Button( btn['text'], functools.partial(open_gold_link, btn['url'], btn.get('restart'))) buttons.add(button)
def json_request_with_sid(path, **get): get['sid'] = get_sid() return json.loads(request(path, **get))