# Path: groupy/utils.py
# def urljoin(base, path=None):
# def parse_share_url(share_url):
# def get_rfc3339(when):
# def get_datetime(timestamp):
#     def __init__(self, key, value):
#     def __repr__(self):
#     def __call__(self, obj):
#     def __init__(self, tests):
#     def __call__(self, objects):
#     def find(self, objects):
#     def passes(self, obj):
# def make_filter(**tests):
# class AttrTest:
# class Filter:


from . import base
from . import blocks
from groupy import utils


class User(base.Manager):
    def __init__(self, session):
        super().__init__(session, 'users')
        self._me = None
        self._blocks = None
        self.sms_mode = SmsMode(self.session)

    @property
    def blocks(self):
        if self._blocks is None:
            self._blocks = blocks.Blocks(self.session, self.me['id'])
        return self._blocks

    @property
    def me(self):
        if self._me is None:
            self._me = self.get_me()
        return self._me

    def get_me(self):

# Path: groupy/utils.py
# def urljoin(base, path=None):
# def parse_share_url(share_url):
# def get_rfc3339(when):
# def get_datetime(timestamp):
#     def __init__(self, key, value):
#     def __repr__(self):
#     def __call__(self, obj):
#     def __init__(self, tests):
#     def __call__(self, objects):
#     def find(self, objects):
#     def passes(self, obj):
# def make_filter(**tests):
# class AttrTest:
# class Filter:


# Path: groupy/api/user.py
from . import base
from . import blocks
from groupy import utils



class User(base.Manager):
    def __init__(self, session):
        super().__init__(session, 'users')
        self._me = None
        self._blocks = None
        self.sms_mode = SmsMode(self.session)

    @property
    def blocks(self):
        if self._blocks is None:
            self._blocks = blocks.Blocks(self.session, self.me['id'])
        return self._blocks

    @property
    def me(self):
        if self._me is None:
            self._me = self.get_me()
        return self._me

    def get_me(self):

        url = utils.urljoin(self.url, 'me')