Polyman Documentation - v2.2.2
    Preparing search index...

    Function remotePullProblemAction

    • Pulls a problem from Polygon and saves it in Polyman's template structure. Downloads all problem files including solutions, tests, checker, validator, etc. If local problem exists with same ID, prompts user to merge or overwrite.

      Parameters

      • problemIdOrPath: string

        Problem ID or path to directory with Config.json

      • savePath: string

        Directory path where problem should be saved

      • Optionaloptions: {
            all?: boolean;
            solutions?: boolean;
            checker?: boolean;
            validator?: boolean;
            generators?: boolean;
            statements?: boolean;
            tests?: string;
            metadata?: boolean;
            info?: boolean;
        }

        Pull options for selective download

      Returns Promise<void>

      Resolves when pull completes

      If credentials are not registered

      If problem not found on Polygon

      If file operations fail

      // From CLI: polyman remote-pull 123456 ./my-problem
      await remotePullProblemAction('123456', './my-problem');
      // Downloads problem 123456 to ./my-problem/
      // Pull to current directory
      await remotePullProblemAction('.', '.');
      // Uses problem ID from Config.json in current directory