Single File Content

Version: 1.1.1
vcs/single-file-content
superface

Retrieve the raw content of single file from a version control system repository.

Single File Content

Get the content of the specified file.

Owner
Repo
Path
Ref
Size
Content
Encoding

1. Install

npx @superfaceai/cli install vcs/single-file-content

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/single-file-content');

  // Use the profile
  const result = await profile
    .getUseCase('SingleFileContent')
    .perform({
      owner: 'superfaceai',
      repo: 'one-sdk-js',
      path: '/README.md',
      ref: 'c5e4d76'
    });

  return result.unwrap();
}

run();

3. Add providers