Join a group using a share token.

        :param str group_id: the group_id of a group
        :param str share_token: the share token
        :return: the group
        :rtype: :class:`~groupy.api.groups.Group`
559571
def join(self, group_id, share_token):
        
        path = '{}/join/{}'.format(group_id, share_token)
        url = utils.urljoin(self.url, path)
        response = self.session.post(url)
        group = response.data['group']
        return Group(self, **group)
1252570
def share(self, auth, resource, options={}, defer=False):
        
        return self._call('share', auth, [resource, options], defer)
1279254
def Group(self):
		

		return(clc.v2.Group(id=self.groupId,alias=self.alias,session=self.session))
590071
def GroupsDelete(self, group_id):
        
        if self.__SenseApiCall__('/groups/{0}.json'.format(group_id), 'DELETE'):
            return True
        else:
            self.__error__ = "api call unsuccessful"
            return False
878493
def fetchGroupInfo(self, *group_ids):
        
        threads = self.fetchThreadInfo(*group_ids)
        groups = {}
        for id_, thread in threads.items():
            if thread.type == ThreadType.GROUP:
                groups[id_] = thread
            else:
                raise FBchatUserError("Thread {} was not a group".format(thread))

        return groups
1296556
def xgroup_setid(self, name, groupname, id):
        
        return self.execute_command('XGROUP SETID', name, groupname, id)
391876
def getReadGroup(self, id_):
        
        if id_ not in self._readGroupIdMap:
            raise exceptions.ReadGroupNotFoundException(id_)
        return self._readGroupIdMap[id_]
1081862
def create_group(self, **kwargs):
        
        response = self.__requester.request(
            'POST',
            'groups',
            _kwargs=combine_kwargs(**kwargs)
        )
        return Group(self.__requester, response.json())
1116494
def send_group_image(self, sender, receiver, media_id):
        
        return self.send_image(sender, 'group', receiver, media_id)
564102
def update_group(self, group_id, name):
        
        parameters = {
            'name': name
        }

        url = self.TEAM_GROUPS_ID_URL % group_id

        connection = Connection(self.token)
        connection.set_url(self.production, url)
        connection.add_header('Content-Type', 'application/json')
        connection.add_params(parameters)

        return connection.patch_request()
133840
def group_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/groups/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
968391
public function sendWxcardByGroup($group_id, $card_id, array $card_ext = array())
    {
        $ret = array();
        $ret['filter']['group_id'] = $group_id;
        if (! empty($this->is_to_all)) {
            $ret['filter']['is_to_all'] = $this->is_to_all;
        }
        $ret['msgtype'] = 'wxcard';
        $ret['wxcard']['card_id'] = $card_id;
        if (! empty($card_ext)) {
            $ret['wxcard']['card_ext'] = json_encode($card_ext);
        }
        return $this->sendAll($ret);
    }
134686
def get(self, id):
        
        url = utils.urljoin(self.url, id)
        response = self.session.get(url)
        return Group(self, **response.data)
849091
def add_tags_shares(self, tags: dict = dict()):
        
        # check if shares_id have already been retrieved or not
        if not hasattr(self, "shares_id"):
            shares = self.shares()
            self.shares_id = {
                "share:{}".format(i.get("_id")): i.get("name") for i in shares
            }
        else:
            pass
        # update query tags
        tags.update(self.shares_id)
1249769
def join_group(self, group_alias, message=None):
        
        xml = self.api.xml(API_GROUP_GROUP_HOME % group_alias, params={
            'action': 'join',
            'ck': self.api.ck(),
        })
        misc = xml.xpath('//div[@class="group-misc"]')[0]
        intro = misc.xpath('string(.)') or ''
        if intro.find('退出小组') > -1:
            return 'joined'
        elif intro.find('你已经申请加入小组') > -1:
            return 'waiting'
        elif intro.find('申请加入小组') > -1:
            res = self.api.xml(API_GROUP_GROUP_HOME % group_alias, 'post', data={
                'ck': self.api.ck(),
                'action': 'request_join',
                'message': message,
                'send': '发送',
            })
            misc = res.xpath('//div[@class="group-misc"]')[0]
            intro = misc.xpath('string(.)') or ''
            if intro.find('你已经申请加入小组') > -1:
                return 'waiting'
            else:
                return 'initial'
        else:
            return 'initial'
844942
def add_member_to_group(self, group_id, member_id):
        
        route_values = {}
        if group_id is not None:
            route_values['groupId'] = self._serialize.url('group_id', group_id, 'str')
        if member_id is not None:
            route_values['memberId'] = self._serialize.url('member_id', member_id, 'str')
        self._send(http_method='PUT',
                   location_id='45a36e53-5286-4518-aa72-2d29f7acc5d8',
                   version='5.0-preview.1',
                   route_values=route_values)
663346
def find(self, groupid):
        
        return self.indices[self.offset[groupid]
                :self.offset[groupid]+ self.length[groupid]]