# 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/pagers.py
# class Pager:
# class GroupList(Pager):
# class ChatList(GroupList):
# class MessageList(Pager):
# class GalleryList(MessageList):
#     def __init__(self, manager, endpoint, **params):
#     def __getitem__(self, index):
#     def __iter__(self):
#     def set_next_page_params(self):
#     def fetch(self):
#     def fetch_next(self):
#     def autopage(self):
#     def set_next_page_params(self):
#     def __init__(self, manager, endpoint, **params):
#     def detect_mode(cls, **params):
#     def set_next_page_params(self):
#     def get_last_item_index(self):
#     def get_next_page_param(self, item):
#     def fetch_next(self):
#     def get_next_page_param(self, item):
# 
# Path: groupy/exceptions.py
# class GroupyError(Exception):
# class MissingMembershipError(GroupyError):
# class FindError(GroupyError):
# class NoMatchesError(FindError):
# class MultipleMatchesError(FindError):
# class ApiError(GroupyError):
# class NoResponse(ApiError):
# class BadResponse(ApiError):
# class InvalidJsonError(BadResponse):
# class MissingResponseError(BadResponse):
# class MissingMetaError(BadResponse):
# class ResultsError(ApiError):
# class ResultsNotReady(ResultsError):
# class ResultsExpired(ResultsError):
#     def __init__(self, message=None):
#     def __init__(self, group_id, user_id, message=None):
#     def __init__(self, message, objects, tests, matches=None):
#     def __init__(self, objects, tests):
#     def __init__(self, objects, tests, matches):
#     def __init__(self, request, *args, **kwargs):
#     def __init__(self, response, message=None):
#     def _extract_message(self, response):
#     def __init__(self, response, message='The JSON was incomplete/invalid'):
#     def __init__(self, response, message='The response contained no response data'):
#     def __init__(self, response, message='The response contained no meta data'):
#     def __init__(self, response, message):
#     def __init__(self, response, message='The results are not ready yet'):
#     def __init__(self, response, message='The results have expired'):


from . import base
from . import bots
from . import messages
from . import memberships
from . import user
from groupy import utils
from groupy import pagers
from groupy import exceptions
                                 dm_notification=dm_notification)

    def change_owners(self, user_id):
        """Change the owner of the group.

        Note that the user must be a member of the group.

        :param str user_id: the user_id of the new owner
        :return: the result
        :rtype: :class:`~groupy.api.groups.ChangeOwnersResult`
        """
        return self.manager.change_owners(self.group_id, user_id)

    def get_membership(self):
        """Get your membership.

        Note that your membership may not exist. For example, you do not have
        a membership in a former group. Also, the group returned by the API
        when rejoining a former group does not contain your membership. You
        must call :func:`refresh_from_server` to update the list of members.

        :return: your membership in the group
        :rtype: :class:`~groupy.api.memberships.Member`
        :raises groupy.exceptions.MissingMembershipError: if your membership is
                not in the group data
        """
        user_id = self._user.me['user_id']
        for member in self.members:
            if member.user_id == user_id:
                return member

# 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/pagers.py
# class Pager:
# class GroupList(Pager):
# class ChatList(GroupList):
# class MessageList(Pager):
# class GalleryList(MessageList):
#     def __init__(self, manager, endpoint, **params):
#     def __getitem__(self, index):
#     def __iter__(self):
#     def set_next_page_params(self):
#     def fetch(self):
#     def fetch_next(self):
#     def autopage(self):
#     def set_next_page_params(self):
#     def __init__(self, manager, endpoint, **params):
#     def detect_mode(cls, **params):
#     def set_next_page_params(self):
#     def get_last_item_index(self):
#     def get_next_page_param(self, item):
#     def fetch_next(self):
#     def get_next_page_param(self, item):
# 
# Path: groupy/exceptions.py
# class GroupyError(Exception):
# class MissingMembershipError(GroupyError):
# class FindError(GroupyError):
# class NoMatchesError(FindError):
# class MultipleMatchesError(FindError):
# class ApiError(GroupyError):
# class NoResponse(ApiError):
# class BadResponse(ApiError):
# class InvalidJsonError(BadResponse):
# class MissingResponseError(BadResponse):
# class MissingMetaError(BadResponse):
# class ResultsError(ApiError):
# class ResultsNotReady(ResultsError):
# class ResultsExpired(ResultsError):
#     def __init__(self, message=None):
#     def __init__(self, group_id, user_id, message=None):
#     def __init__(self, message, objects, tests, matches=None):
#     def __init__(self, objects, tests):
#     def __init__(self, objects, tests, matches):
#     def __init__(self, request, *args, **kwargs):
#     def __init__(self, response, message=None):
#     def _extract_message(self, response):
#     def __init__(self, response, message='The JSON was incomplete/invalid'):
#     def __init__(self, response, message='The response contained no response data'):
#     def __init__(self, response, message='The response contained no meta data'):
#     def __init__(self, response, message):
#     def __init__(self, response, message='The results are not ready yet'):
#     def __init__(self, response, message='The results have expired'):


# Path: groupy/api/groups.py
from . import base
from . import bots
from . import messages
from . import memberships
from . import user
from groupy import utils
from groupy import pagers
from groupy import exceptions

                                 dm_notification=dm_notification)

    def change_owners(self, user_id):
        """Change the owner of the group.

        Note that the user must be a member of the group.

        :param str user_id: the user_id of the new owner
        :return: the result
        :rtype: :class:`~groupy.api.groups.ChangeOwnersResult`
        """
        return self.manager.change_owners(self.group_id, user_id)

    def get_membership(self):
        """Get your membership.

        Note that your membership may not exist. For example, you do not have
        a membership in a former group. Also, the group returned by the API
        when rejoining a former group does not contain your membership. You
        must call :func:`refresh_from_server` to update the list of members.

        :return: your membership in the group
        :rtype: :class:`~groupy.api.memberships.Member`
        :raises groupy.exceptions.MissingMembershipError: if your membership is
                not in the group data
        """
        user_id = self._user.me['user_id']
        for member in self.members:
            if member.user_id == user_id:
                return member

        raise exceptions.MissingMembershipError(self.group_id, user_id)