You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.

Single File Content

vcs/single-file-content@1.1.1
3 providers

Single File Content

Get the content of the specified file.

Input
Owner
Repo
Path
Ref
Result
Size
Content
Encoding

1.Choose a provider

2.Use SingleFileContent with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk

Structure details

Input (object)

owner
Owner of the repository
repo
Repository name
path
Path to file at repository
ref
Branch eg. main

Example

Result (object)

size
Size of content according to used provider
content
Content of file
encoding
Used encoding

Example

Implementation details

Provider
mock
Use case
SingleFileContent
Author
@superface
Source
Verified