MOVED TO GitLab
Panda.NuGet.BillbeeClient is a .NET Core library designed to provide an easy-to-use interface for communicating with the Billbee API. This project is a fork of the billbeeio/billbee-csharp-sdk repository.
The primary goal of this library is to provide a modern, efficient, and streamlined way to interact with the Billbee API. Specifically, it employs System.Net.Http
for making HTTP requests and System.Text.Json
for JSON serialization and deserialization. These choices move away from the RestSharp and Newtonsoft.Json libraries used in the original repository.
-
Consistency: Utilizing native .NET Core libraries like
System.Net.Http
andSystem.Text.Json
brings a level of consistency and integration that external libraries may not offer. -
Performance: Both
System.Net.Http
andSystem.Text.Json
are optimized for performance, which can be crucial for high-throughput applications. -
Ease of Maintenance: Using built-in libraries means fewer external dependencies, making it easier to maintain and update the project.
-
Forward Compatibility: Leveraging core libraries ensures better forward compatibility with future .NET Core updates.
-
Breaking Changes: Moving away from RestSharp eliminates the risk posed by breaking changes in external libraries, providing a more stable foundation for the project.
By aligning with the .NET Core ecosystem, this library aims for robustness, efficiency, and ease of use.
This project implements request rate limiting through a singleton RateLimiter. This ensures that API calls do not exceed the set rate limits. Note, however, that this implementation will only function reliably if multiple instances of the application are not running concurrently.
The Panda.NuGet.BillbeeClient library is available as a NuGet package. You can install it via the NuGet package manager from the GitHub repository pandapknaepel/billbee-csharp-sdk.
dotnet add package Panda.NuGet.BillbeeClient --version <version>
Replace <version>
with the latest version number.
To use the Panda.NuGet.BillbeeClient in your project, first, you need to configure the services in the Startup.cs
file of your project.
using Panda.NuGet.BillbeeClient.Extensions;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddBillbeeApi(new BillbeeApiConfig
{
Username = "your-username",
Password = "your-password",
ApiKey = "your-api-key",
BaseUrl = "https://api.billbee.io"
});
}
}
You can now inject the IBillbeeClient
interface wherever you need to use the Billbee API.
public class MyService
{
private readonly IBillbeeClient _billbeeClient;
public MyService(IBillbeeClient billbeeClient)
{
_billbeeClient = billbeeClient;
}
public async Task DoSomethingAsync()
{
var events = await _billbeeClient.Events.GetEventsAsync();
// ...
}
}
Panda.NuGet.BillbeeClient supports various endpoints allowing access to different sections of the Billbee API, such as events, shipments, webhooks, products, automatic user creation, customer base data, customer addresses, orders, cloud storages, and enum values.
For more details on the Billbee API and what you can do with it, please refer to the official Billbee API documentation or Billbee's website.
If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request. Your contributions are welcome!
This project inherits the license from the original billbeeio/billbee-csharp-sdk repository.