Repository Files

Version: 1.0.0
vcs/repository-files
superface

Access files in a hosted VCS (Git) repository.

List Files in Directory

List files in a repository on the provided path

Repository
Repository Owner
Directory Path
Reference (branch)
Page
entries
Next page

1. Install

npx @superfaceai/cli install vcs/repository-files

2. Use in your code

const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the installed profile
  const profile = await sdk.getProfile('vcs/repository-files');

  // Use the profile
  const result = await profile
    .getUseCase('ListDirectory')
    .perform({
      repository: '',
      owner: '',
      path: '',
      reference: '',
      page: ''
    });

  return result.unwrap();
}

run();

3. Add providers