ReadGitHub Class
Reads information from GitHub.
graph BT Type-->Base0["MultiConfigModule"] click Base0 "/api/Statiq.Common/MultiConfigModule" Base0-->Base1["MultiConfigModuleBase"] click Base1 "/api/Statiq.Common/MultiConfigModuleBase" Base1-->Base2["Module"] click Base2 "/api/Statiq.Common/Module" Base2-->Base3["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type["ReadGitHub"] class Type type-node

Syntax

public class ReadGitHub : MultiConfigModule, IModule

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.

This module outputs entirely new documents that are representations of the Octokit result object for the request. If the request delegate requires a document, outputs are generated for each input document and concatenated. If the request delegate does not require a document, one set of outputs are generated for the specified request.

Constructors

Properties

Name Property Type Summary
Configs IReadOnlyDictionary<string, IConfig>
Inherited from MultiConfigModuleBase
ForceDocumentExecution bool
Inherited from MultiConfigModuleBase

Methods

Name Return Value Summary
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
CombineConfig<TValue>(string, Config<TValue>, Func<TValue, TValue, IDocument, IExecutionContext, Task<TValue>>) MultiConfigModuleBase
Inherited from MultiConfigModuleBase
CombineConfig<TValue>(string, Config<TValue>, Func<TValue, TValue, IDocument, IExecutionContext, TValue>) MultiConfigModuleBase
Inherited from MultiConfigModuleBase
CombineConfig<TValue>(string, Config<TValue>, Func<TValue, TValue, IExecutionContext, Task<TValue>>) MultiConfigModuleBase
Inherited from MultiConfigModuleBase
CombineConfig<TValue>(string, Config<TValue>, Func<TValue, TValue, IExecutionContext, TValue>) MultiConfigModuleBase
Inherited from MultiConfigModuleBase
CombineConfig<TValue>(string, Config<TValue>, Func<TValue, TValue, Task<TValue>>) MultiConfigModuleBase
Inherited from MultiConfigModuleBase
CombineConfig<TValue>(string, Config<TValue>, Func<TValue, TValue, TValue>) MultiConfigModuleBase
Inherited from MultiConfigModuleBase
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
ExecuteConfigAsync(IDocument, IExecutionContext, IMetadata) Task<IEnumerable<IDocument>>
ExecuteContextAsync(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
Inherited from MultiConfigModule
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module.
Inherited from MultiConfigModuleBase
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
GetConfig(string) IConfig
Gets the config for a given key.
Inherited from MultiConfigModuleBase
GetConfig<TValue>(string) Config<TValue>
Gets the config for a given key cast to a specific config value.
Inherited from MultiConfigModuleBase
SetConfig(string, IConfig) MultiConfigModuleBase
Sets the config for a given key.
Inherited from MultiConfigModuleBase
TryGetConfig(string, IConfig) bool
Inherited from MultiConfigModuleBase
WithCredentials(Config<string>, Config<string>) ReadGitHub
Creates a connection to the GitHub API with basic authenticated access.
WithCredentials(Config<string>) ReadGitHub
Creates a connection to the GitHub API with OAuth authentication.
WithThrottling(Config<bool>) ReadGitHub
Specifies whether to use throttling with the GitHub client. If true (the default), client requests will be retried automatically for abuse or rate limit exceptions.
WithUrl(Config<string>) ReadGitHub
Specifies and alternate API URL (such as to an Enterprise GitHub endpoint).

Extension Methods