Outputs metadata for information from any API with its client.
- Namespace
- Statiq
.Core - Interfaces
-
- IModule
- IParallelModule
- IDisposable
- Base Types
-
- object
- Module
- ParallelModule
graph BT
Type-->Base0["ParallelModule"]
click Base0 "/api/Statiq.Common/ParallelModule"
Base0-->Base1["Module"]
click Base1 "/api/Statiq.Common/Module"
Base1-->Base2["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type-.->Interface1["IParallelModule"]
click Interface1 "/api/Statiq.Common/IParallelModule"
Type-.->Interface2["IDisposable"]
Type["ReadApi<TClient>"]
class Type type-node
Syntax
public class ReadApi<TClient> : ParallelModule, IModule, IParallelModule, IDisposable
where TClient : class
Remarks
This modules used to submit requests to the API with the API client. Because of the possible large
number of different kinds of requests, this module does not attempt to provide a fully abstract wrapper
around the API. Instead, it simplifies the housekeeping involved in setting up an
API client and requires you to provide functions that fetch whatever data you need. Each request
will be sent for each input document.
Type Parameters
Name | Description |
---|---|
TClient |
Constructors
Name | Summary |
---|---|
ReadApi |
Creates a connection to the API using the client factory. |
ReadApi |
Creates a connection to the API using the client factory. |
ReadApi |
Creates a connection to the API using the client. |
Properties
Name | Property Type | Summary |
---|---|---|
Parallel | bool |
Indicates whether documents will be
processed by this module in parallel.
Inherited from ParallelModule
|
Methods
Name | Return Value | Summary |
---|---|---|
AfterExecution |
void |
Called after each module execution.
Inherited from Module
|
AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
Dispose |
void |
Dispose API client resources.
|
ExecuteAsync |
Task |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
|
ExecuteContextAsync |
Task |
Executes the module once for all input documents.
Inherited from ParallelModule
|
ExecuteInputAsync |
Task |
Executes the module.
|
ExecuteRequestAsync |
Task |
This should be overridden in derived classes to provide preparation for each request if needed.
|
Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
With |
ReadApi |
Initialize the API client.
|
With |
ReadApi |
Initialize the API client.
|
With |
ReadApi |
Initialize the API client.
|
WithRequest |
ReadApi |
Submits a request to the API. This allows you to incorporate data from the execution context and current document in your request.
|
WithRequest |
ReadApi |
Submits a request to the API. This allows you to incorporate data from the execution context and current document in your request.
|
WithRequest |
ReadApi |
Submits a request to the API client. This allows you to incorporate data from the execution context in your request.
|
WithRequest |
ReadApi |
Submits a request to the API client. This allows you to incorporate data from the execution context in your request.
|
WithRequest |
ReadApi |
Submits a request to the API. This allows you to incorporate data from the execution context and current document in your request.
|
WithRequest |
ReadApi |
Submits a request to the API. This allows you to incorporate data from the execution context and current document in your request.
|
WithRequest |
ReadApi |
Submits a request to the API client. This allows you to incorporate data from the execution context in your request.
|
WithRequest |
ReadApi |
Submits a request to the API client. This allows you to incorporate data from the execution context in your request.
|
WithRequestDelay |
ReadApi |
Submits the requests delay for each request in the current instance of module.
|
WithRequestLimit |
ReadApi |
Submits the limit of executing requests.
|