Flow.Ingoing
1.0.0
dotnet add package Flow.Ingoing --version 1.0.0
NuGet\Install-Package Flow.Ingoing -Version 1.0.0
<PackageReference Include="Flow.Ingoing" Version="1.0.0" />
paket add Flow.Ingoing --version 1.0.0
#r "nuget: Flow.Ingoing, 1.0.0"
// Install Flow.Ingoing as a Cake Addin #addin nuget:?package=Flow.Ingoing&version=1.0.0 // Install Flow.Ingoing as a Cake Tool #tool nuget:?package=Flow.Ingoing&version=1.0.0
Flow.Ingoing
Flow.Ingoing is a powerful .NET library that simplifies API integration by providing a flexible and configurable way to process API flows with support for various authentication methods, content types, and nested call stacks.
Features
- 🔐 Multiple authentication protocols support (Basic, OAuth2, API Key)
- 📄 JSON and XML content type handling
- 🔄 Nested API call stacks processing
- 🔗 Dynamic link substitution
- 🔁 Automatic retry policy on failures
- 📝 Comprehensive logging
- ⚡ Asynchronous operations
Installation
dotnet add package Flow.Ingoing
Quick Start
using Flow.Ingoing;
using Flow.Ingoing.Models;
// Create API flow configuration
var flow = new ApiFlow
{
Name = "MyApiFlow",
BaseUrl = "https://api.example.com",
ContentType = ContentTypes.Json,
CallStacks = new List<CallStack>
{
new CallStack
{
Name = "Users",
Path = "/api/users",
ApiMethod = HttpVerbs.Get
}
}
};
// Initialize processor
var processor = new ApiFlowProcessor(logger);
// Process the flow
var result = await processor.ProcessAsync(flow);
Authentication
The library supports multiple authentication protocols:
Basic Authentication
var flow = new ApiFlow
{
AuthentificationProtocol = new BasicProtocolParameters
{
Username = "user",
Password = "pass"
}
};
OAuth2
var flow = new ApiFlow
{
AuthentificationProtocol = new OAuth2ProtocolParameters
{
TokenEndpoint = "https://auth.example.com/token",
ClientId = "client_id",
ClientSecret = "client_secret"
}
};
API Key
var flow = new ApiFlow
{
AuthentificationProtocol = new ApiKeyProtocolParameters
{
Key = "api_key",
Value = "your_api_key"
}
};
Advanced Usage
Nested Call Stacks
var flow = new ApiFlow
{
CallStacks = new List<CallStack>
{
new CallStack
{
Name = "Users",
Path = "/api/users",
Childrens = new List<CallStack>
{
new CallStack
{
Name = "UserPosts",
Path = "/api/users/{userId}/posts",
Links = new Dictionary<string, string>
{
{"{userId}", "id"}
}
}
}
}
}
};
Dynamic Link Substitution
var callStack = new CallStack
{
Path = "/api/resources/{resourceId}",
Links = new Dictionary<string, string>
{
{"{resourceId}", "dynamicValue"}
}
};
Error Handling
The library includes built-in retry logic for failed requests:
try
{
var result = await processor.ProcessAsync(flow);
}
catch (Exception ex)
{
// Handle errors
logger.LogError(ex, "Error processing flow");
}
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Nuno ARAUJO
Repository
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- IdentityModel (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 8.4.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 65 | 3/10/2025 |