public function getMessages($id, $limit = 20, $offset = 0)
    {
        if ($this->isEmptyId($id)) {
            throw new InvalidArgumentException;
        }

        $params = [
            'count' => $limit,
            'after' => $offset
        ];

        $data = $this->call('conversations/' . $id . '/parts', $params, 'get');

        $array = [];
        if ($data) {
            foreach ($data as $msg) {
                $array[] = Message::fromResponse($msg);
            }
        }

        return $array;
    }
public function getMessages($id, $limit = 20, $offset = 0)
    {
        if ($this->isEmptyId($id)) {
            throw new InvalidArgumentException;
        }

        $params = [
            'count' => $limit,
            'after' => $offset
        ];

        $data = $this->call('conversations/' . $id . '/parts', $params, 'get');

        $array = [];
        if ($data) {
            foreach ($data as $msg) {
                $array[] = Message::fromResponse($msg);
            }
        }

        return $array;
    }
public function getMessages ( $ id , $ limit = 20 , $ offset = 0 ) { if ( $ this -> isEmptyId ( $ id ) ) { throw new InvalidArgumentException ; } $ params = [ 'count' => $ limit , 'after' => $ offset ] ; $ data = $ this -> call ( 'conversations/' . $ id . '/parts' , $ params , 'get' ) ; $ array = [ ] ; if ( $ data ) { foreach ( $ data as $ msg ) { $ array [ ] = Message :: fromResponse ( $ msg ) ; } } return $ array ; }
Get messages from conversation.

@param int $id conversation id
@param int $count
@param int $offset

@return Message

@throws InvalidArgumentException
@throws Exception
Get messages from conversation .