src/whatsprot.class.php
protected function sendGetGroupsFiltered($type)
    {
        $msgID = $this->nodeId['getgroups'] = $this->createIqId();
        $child = new ProtocolNode($type, null, null, null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgID,
                'type'  => 'get',
                'xmlns' => 'w:g2',
                'to'    => Constants::WHATSAPP_GROUP_SERVER,
            ], [$child], null);

        $this->sendNode($node);
    }
protected function sendGetGroupsFiltered($type)
    {
        $msgID = $this->nodeId['getgroups'] = $this->createIqId();
        $child = new ProtocolNode($type, null, null, null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgID,
                'type'  => 'get',
                'xmlns' => 'w:g2',
                'to'    => Constants::WHATSAPP_GROUP_SERVER,
            ], [$child], null);

        $this->sendNode($node);
    }
protected function sendGetGroupsFiltered ( $ type ) { $ msgID = $ this -> nodeId [ 'getgroups' ] = $ this -> createIqId ( ) ; $ child = new ProtocolNode ( $ type , null , null , null ) ; $ node = new ProtocolNode ( 'iq' , [ 'id' => $ msgID , 'type' => 'get' , 'xmlns' => 'w:g2' , 'to' => Constants :: WHATSAPP_GROUP_SERVER , ] , [ $ child ] , null ) ; $ this -> sendNode ( $ node ) ; }
Send the getGroupList request to WhatsApp.

@param string $type Type of list of groups to retrieve. "owning" or "participating"
Send the getGroupList request to WhatsApp .