LuckyCodeIntegration 2.0.33
dotnet add package LuckyCodeIntegration --version 2.0.33
NuGet\Install-Package LuckyCodeIntegration -Version 2.0.33
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LuckyCodeIntegration" Version="2.0.33" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LuckyCodeIntegration" Version="2.0.33" />
<PackageReference Include="LuckyCodeIntegration" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LuckyCodeIntegration --version 2.0.33
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LuckyCodeIntegration, 2.0.33"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LuckyCodeIntegration@2.0.33
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LuckyCodeIntegration&version=2.0.33
#tool nuget:?package=LuckyCodeIntegration&version=2.0.33
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LuckyCodeIntegration
مكتبة .NET تساعدك على التكامل بسرعة مع واجهات Redeemly/LuckyCode عبر HttpClient مع دعم Dependency Injection.
المتطلبات
- .NET 8.0+
التثبيت
عبر NuGet
dotnet add package LuckyCodeIntegration
الإعداد (Dependency Injection)
أضف الخدمة عبر الامتداد AddIntegrationService ثم مرّر إعدادات الاتصال.
Program.cs
using LuckyCodeLibrary.IntegrationHelper.Extensions;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddIntegrationService(options =>
{
options.BaseUrl = "https://api.example.com";
options.AccessCredential.ApiKey = "YOUR_API_KEY";
options.AccessCredential.ClientId = "YOUR_CLIENT_ID";
});
var app = builder.Build();
app.Run();
الاستخدام
بعد التسجيل في DI، يمكنك حقن ILuckyCodeServices واستخدامه.
مثال: Pull ثم Reveal ثم Redeem
using LuckyCodeLibrary.IntegrationHelper.Services;
public class LuckyCodeController
{
private readonly ILuckyCodeServices _luckyCode;
public LuckyCodeController(ILuckyCodeServices luckyCode)
{
_luckyCode = luckyCode;
}
public async Task UseLuckyCodeAsync()
{
var pull = await _luckyCode.PullCode(new PullCodeRequest
{
// عبّئ الخصائص المطلوبة حسب الموديل لديك
});
var reveal = await _luckyCode.RevealCode(new RevealCodeRequest
{
// عبّئ الخصائص المطلوبة حسب الموديل لديك
});
var redeem = await _luckyCode.RedeemCode(new RedeemCodeRequest
{
// عبّئ الخصائص المطلوبة حسب الموديل لديك
});
}
}
الدوال المتاحة (ILuckyCodeServices)
GetToken(CredentialModel credential)GetToken()PullCode(PullCodeRequest dto)RevealCode(RevealCodeRequest dto)RedeemCode(RedeemCodeRequest dto)MultiPull(PullCodeRequest dto)MultiPullThenReveal(PullCodeRequest dto)CheckSerialCode(string serialCode)GetCustomersLog(CustomerPakageLogQuery queryDto)EnsureValidToken()
الإعدادات (ConnectionSettings)
BaseUrl: رابط الـ API الأساسي.AccessCredential.ApiKey: مفتاح الوصول.AccessCredential.ClientId: معرّف العميل.
ملاحظات
- يتم تخزين التوكن داخليًا (caching) مع إعادة تحديث تلقائية قبل انتهاء الصلاحية.
- يتم حقن
HttpClientعبرAddHttpClient.
الترخيص
MIT
| 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
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 |
|---|---|---|
| 2.0.33 | 114 | 2/16/2026 |
| 2.0.32 | 107 | 2/12/2026 |
| 2.0.31 | 107 | 2/5/2026 |
| 2.0.30 | 117 | 2/5/2026 |
| 2.0.29 | 112 | 2/5/2026 |
| 2.0.28 | 107 | 2/5/2026 |
| 2.0.27 | 112 | 2/5/2026 |
| 2.0.26 | 109 | 2/5/2026 |
| 2.0.25 | 116 | 2/4/2026 |
| 2.0.23 | 113 | 2/4/2026 |
| 2.0.22 | 117 | 2/4/2026 |
| 2.0.21 | 116 | 2/4/2026 |
| 2.0.20 | 115 | 2/4/2026 |
| 2.0.19 | 121 | 2/3/2026 |
| 2.0.18 | 117 | 2/3/2026 |
| 2.0.16 | 185 | 10/13/2025 |
| 2.0.14 | 188 | 10/13/2025 |
| 2.0.13 | 194 | 10/9/2025 |