public function list(int $offset = 0, int $limit = self::MAX_ITEMS_PER_REQUEST, array $fields = []): array
    {
        /** @var Task[] $tasks */
        $tasks = [];
        $response = $this->client->get($this->prepareUrlForKey('get-tasks'), [
            '_skip' => $offset,
            '_limit' => $limit,
            '_fields' => $fields,
        ]);

        $responseData = $response->getDecodedBody();

        foreach ($responseData['data'] as $task) {
            $tasks[] = new Task($task);
        }

        return $tasks;
    }
public function list(int $offset = 0, int $limit = self::MAX_ITEMS_PER_REQUEST, array $fields = []): array
    {
        /** @var Task[] $tasks */
        $tasks = [];
        $response = $this->client->get($this->prepareUrlForKey('get-tasks'), [
            '_skip' => $offset,
            '_limit' => $limit,
            '_fields' => $fields,
        ]);

        $responseData = $response->getDecodedBody();

        foreach ($responseData['data'] as $task) {
            $tasks[] = new Task($task);
        }

        return $tasks;
    }
public function list ( int $ offset = 0 , int $ limit = self :: MAX_ITEMS_PER_REQUEST , array $ fields = [ ] ) : array { /** @var Task[] $tasks */ $ tasks = [ ] ; $ response = $ this -> client -> get ( $ this -> prepareUrlForKey ( 'get-tasks' ) , [ '_skip' => $ offset , '_limit' => $ limit , '_fields' => $ fields , ] ) ; $ responseData = $ response -> getDecodedBody ( ) ; foreach ( $ responseData [ 'data' ] as $ task ) { $ tasks [ ] = new Task ( $ task ) ; } return $ tasks ; }
Gets up to the specified number of tasks that matches the given criteria.

@param int      $offset The offset from which start getting the items
@param int      $limit  The maximum number of items to get
@param string[] $fields The subset of fields to get (defaults to all)

@return Task[]
Gets up to the specified number of tasks that matches the given criteria .