How to use the groupy.utils.get_datetime function in groupy

To help you get started, we’ve selected a few groupy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rhgrant10 / Groupy / groupy / api / messages.py View on Github external
def __init__(self, manager, conversation_id, **data):
        super().__init__(manager, **data)
        self.conversation_id = conversation_id
        self.created_at = utils.get_datetime(self.data['created_at'])
        attachments = self.data.get('attachments') or []
        self.attachments = Attachment.from_bulk_data(attachments)
        self._likes = Likes(self.manager.session, self.conversation_id,
                            message_id=self.id)
github rhgrant10 / Groupy / groupy / api / chats.py View on Github external
def __init__(self, manager, **data):
        super().__init__(manager, **data)
        self.messages = messages.DirectMessages(self.manager.session,
                                                self.other_user['id'])
        self.created_at = utils.get_datetime(self.data['created_at'])
        self.updated_at = utils.get_datetime(self.data['updated_at'])
github rhgrant10 / Groupy / groupy / api / groups.py View on Github external
def __init__(self, manager, **data):
        super().__init__(manager, **data)
        self.messages = messages.Messages(self.manager.session, self.id)
        self.gallery = messages.Gallery(self.manager.session, self.group_id)
        self.leaderboard = messages.Leaderboard(self.manager.session, self.id)
        self.memberships = memberships.Memberships(self.manager.session, self.id)
        self._bots = bots.Bots(self.manager.session)
        self._user = user.User(self.manager.session)

        members = self.data.get('members') or []
        self.members = [memberships.Member(self.manager, self.id, **m) for m in members]
        self.created_at = utils.get_datetime(self.data['created_at'])
        self.updated_at = utils.get_datetime(self.data['updated_at'])
github rhgrant10 / Groupy / groupy / api / groups.py View on Github external
def __init__(self, manager, **data):
        super().__init__(manager, **data)
        self.messages = messages.Messages(self.manager.session, self.id)
        self.gallery = messages.Gallery(self.manager.session, self.group_id)
        self.leaderboard = messages.Leaderboard(self.manager.session, self.id)
        self.memberships = memberships.Memberships(self.manager.session, self.id)
        self._bots = bots.Bots(self.manager.session)
        self._user = user.User(self.manager.session)

        members = self.data.get('members') or []
        self.members = [memberships.Member(self.manager, self.id, **m) for m in members]
        self.created_at = utils.get_datetime(self.data['created_at'])
        self.updated_at = utils.get_datetime(self.data['updated_at'])
github rhgrant10 / Groupy / groupy / api / chats.py View on Github external
def __init__(self, manager, **data):
        super().__init__(manager, **data)
        self.messages = messages.DirectMessages(self.manager.session,
                                                self.other_user['id'])
        self.created_at = utils.get_datetime(self.data['created_at'])
        self.updated_at = utils.get_datetime(self.data['updated_at'])