GitHub Class

Summary

Outputs metadata for information from GitHub.
Assembly
Wyam.GitHub.dll
Namespace
Wyam.GitHub
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type-.->Interface1["IAsNewDocuments"] click Interface1 "/api/Wyam.Common.Modules/IAsNewDocuments" Type["GitHub"] class Type type-node

Syntax

public class GitHub : IModule, IAsNewDocuments

Remarks

This modules uses the Octokit library and associated types to submit requests to GitHub. Because of the large number of different kinds of requests, this module does not attempt to provide a fully abstract wrapper around the Octokit library. Instead, it simplifies the housekeeping involved in setting up an Octokit client and requires you to provide functions that fetch whatever data you need. Each request will be sent for each input document.

Constructors

Name Summary
GitHub() Creates an unauthenticated connection to the GitHub API.
GitHub(string) Creates a connection to the GitHub API with OAuth authentication.
GitHub(string, string) Creates a connection to the GitHub API with basic authenticated access.

Methods

Name Value Summary
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
WithRequest(string, Func<GitHubClient, Object>) GitHub
Submits a request to the GitHub client.
WithRequest(string, Func<IDocument, IExecutionContext, GitHubClient, Object>) GitHub
Submits a request to the GitHub client. This allows you to incorporate data from the execution context and current document in your request.
WithRequest(string, Func<IExecutionContext, GitHubClient, Object>) GitHub
Submits a request to the GitHub client. This allows you to incorporate data from the execution context in your request.
WithUrl(string) GitHub
Specifies and alternate API URL (such as to an Enterprise GitHub endpoint).
GitHub