public function getLeads($filters = [], $prop = '$last_seen', $order = 'desc', $limit = 20, $offset = 0)
    {
        $params = [
            'filters' => $filters,
            'sort_prop' => $prop,
            'sort_order' => $order,
            'limit' => $limit,
            'offset' => $offset
        ];

        $data = $this->call('apps/' . $this->appId . '/users', $params, 'get');

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

        return $array;
    }
public function getLeads($filters = [], $prop = '$last_seen', $order = 'desc', $limit = 20, $offset = 0)
    {
        $params = [
            'filters' => $filters,
            'sort_prop' => $prop,
            'sort_order' => $order,
            'limit' => $limit,
            'offset' => $offset
        ];

        $data = $this->call('apps/' . $this->appId . '/users', $params, 'get');

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

        return $array;
    }
public function getLeads ( $ filters = [ ] , $ prop = '$last_seen' , $ order = 'desc' , $ limit = 20 , $ offset = 0 ) { $ params = [ 'filters' => $ filters , 'sort_prop' => $ prop , 'sort_order' => $ order , 'limit' => $ limit , 'offset' => $ offset ] ; $ data = $ this -> call ( 'apps/' . $ this -> appId . '/users' , $ params , 'get' ) ; $ array = [ ] ; if ( $ data [ 'users' ] ) { foreach ( $ data [ 'users' ] as $ msg ) { $ array [ ] = User :: fromResponse ( $ msg ) ; } } return $ array ; }
Get all leads in application.
Lead - a user who has known name, email, phone, user_id or it was at least one dialogue.

@param array $filters - examples https://carrotquest.io/developers/filters/
@param string $prop - sort field
@param string $order - sort order
@param int $limit - max of users then returned
@param int $offset - offset of beginning

@return array

@throws InvalidArgumentException
@throws Exception
Get all leads in application . Lead - a user who has known name email phone user_id or it was at least one dialogue .