Skip to content
Snippets Groups Projects
Commit 391ded63 authored by Nico's avatar Nico
Browse files

Start working on getting contacts

parent d4e54121
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2019 Nico Alt
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md
from briar.api.models.model import Model
import requests
class Contacts (Model):
def get(self):
r = requests.get(self.constants.get_base_url())
print(r.status_code)
# Copyright (c) 2019 Nico Alt
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md
class Model:
def __init__(self, api):
self._api = api
self.constants = api.constants
......@@ -2,6 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md
from briar.api.models.contacts import Contacts
from briar.gtk.container import Container
......@@ -10,8 +11,13 @@ class MainContainer(Container):
def __init__(self):
super().__init__()
self.__setup_view()
self._load_content()
def __setup_view(self):
self.builder.add_from_resource("/app/briar/gtk/ui/main.ui")
self.add(self.builder.get_object("main"))
self.builder.connect_signals(self)
def _load_content(self):
contacts = Contacts()
contacts.get()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment