readme-inspector

Detect whether or not a README document exists at the root of a GitHub or GitHub Enterprise repository. If a README exists, evaluate the README for quality and provide a numerical score from 0 to 100, where 0 is the lowest quality and 100 is the highest.

Properties:
Name Type Description
api external:Octokit

A GitHubAPI (@octokit/rest) instance.

ReadmeAppraisal ReadmeAppraisal

An API proxy/wrapper that invokes the readme-score-api in order to assess and grade the quality of a README file.

Source:
See:

Methods

(static) authenticate(credentials) → {void}

Sets GitHub credentials for all subsequent requests.

Source:
See:
Parameters:
Name Type Description
credentials object

Secret strings used to prove identity.

Name Type Description
type string

Valid values are basic, oauth, token, and integration.

username string

The name of an agent.

password string

A secret sequence of characters.

token string
key string
secret string
Returns:
Type:
void

(static) check(params) → {Promise.<ReadmeInfo>}

Attempts to GET a README at the root of a GitHub (or GitHub Enterprise) repository and, if found, rate its quality with the readme-score-api.

Source:
Parameters:
Name Type Description
params object

The owner/org, repo, and (optional) branch to check.

Name Type Attributes Default Description
owner string

The account or organization to which the source code belongs.

repo string

The name of the repository in which to look for a README.

ref string <optional>
{Default branch}

The name of the commit/branch/tag. Default: the repository’s default branch (usually master).

Returns:
Type:
Promise.<ReadmeInfo>

(static) getAppraisal(url) → {Promise.<AppraisalData>}

An API proxy for the readme-score-api, which provides quality measures for README files with the AppraisalData interface.

Source:
See:
Parameters:
Name Type Description
url string

The URL or slug of a repository.

Returns:
Type:
Promise.<AppraisalData>

(static) getInfo(params) → {Promise.<ReadmeInfo>}

Attempts to GET a remote README at the root of a GitHub (or GitHub Enterprise) repository, but with an {AppraisalData} NullObject.

Source:
See:
Parameters:
Name Type Description
params object

The owner/org, repo, and (optional) branch to check.

Name Type Attributes Default Description
owner string

The account or organization to which the source code belongs.

repo string

The name of the repository in which to look for a README.

ref string <optional>
{Default branch}

The name of the commit/branch/tag. Default: the repository’s default branch (usually master).

Returns:
Type:
Promise.<ReadmeInfo>
Properties:
Name Type Description
api external:Octokit

A GitHubAPI (@octokit/rest) instance.

ReadmeAppraisal ReadmeAppraisal

An API proxy/wrapper that invokes the readme-score-api in order to assess and grade the quality of a README file.

Source:
See:

Methods

(static) authenticate(credentials) → {void}

Sets GitHub credentials for all subsequent requests.

Source:
See:
Parameters:
Name Type Description
credentials object

Secret strings used to prove identity.

Name Type Description
type string

Valid values are basic, oauth, token, and integration.

username string

The name of an agent.

password string

A secret sequence of characters.

token string
key string
secret string
Returns:
Type:
void

(static) check(params) → {Promise.<ReadmeInfo>}

Attempts to GET a README at the root of a GitHub (or GitHub Enterprise) repository and, if found, rate its quality with the readme-score-api.

Source:
Parameters:
Name Type Description
params object

The owner/org, repo, and (optional) branch to check.

Name Type Attributes Default Description
owner string

The account or organization to which the source code belongs.

repo string

The name of the repository in which to look for a README.

ref string <optional>
{Default branch}

The name of the commit/branch/tag. Default: the repository’s default branch (usually master).

Returns:
Type:
Promise.<ReadmeInfo>

(static) getAppraisal(url) → {Promise.<AppraisalData>}

An API proxy for the readme-score-api, which provides quality measures for README files with the AppraisalData interface.

Source:
See:
Parameters:
Name Type Description
url string

The URL or slug of a repository.

Returns:
Type:
Promise.<AppraisalData>

(static) getInfo(params) → {Promise.<ReadmeInfo>}

Attempts to GET a remote README at the root of a GitHub (or GitHub Enterprise) repository, but with an {AppraisalData} NullObject.

Source:
See:
Parameters:
Name Type Description
params object

The owner/org, repo, and (optional) branch to check.

Name Type Attributes Default Description
owner string

The account or organization to which the source code belongs.

repo string

The name of the repository in which to look for a README.

ref string <optional>
{Default branch}

The name of the commit/branch/tag. Default: the repository’s default branch (usually master).

Returns:
Type:
Promise.<ReadmeInfo>