python-dependency-injector/examples/miniapps/api_client/models.py

15 lines
303 B
Python
Raw Normal View History

"""Models module."""
2016-04-20 14:19:54 +03:00
class User:
2016-04-20 14:19:54 +03:00
"""User model."""
def __init__(self, id, api_client):
"""Initialize instance."""
2016-04-20 14:19:54 +03:00
self.id = id
self.api_client = api_client
def register(self):
"""Register user."""
self.api_client.call('register', {'id': self.id})