Velocesoft.IYS 1.0.1

dotnet add package Velocesoft.IYS --version 1.0.1
NuGet\Install-Package Velocesoft.IYS -Version 1.0.1
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="Velocesoft.IYS" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Velocesoft.IYS --version 1.0.1
#r "nuget: Velocesoft.IYS, 1.0.1"
#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.
// Install Velocesoft.IYS as a Cake Addin
#addin nuget:?package=Velocesoft.IYS&version=1.0.1

// Install Velocesoft.IYS as a Cake Tool
#tool nuget:?package=Velocesoft.IYS&version=1.0.1

Velocesoft.IYS

Velocesoft.IYS, .NET geliştiricilerinin IYS (İleti Yönetim Sistemi) API ile kolayca entegrasyon sağlamalarına olanak tanıyan bir .NET Standard kütüphanesidir. Bu kütüphane ile IYS üzerinden izin yönetimi işlemlerini kolayca gerçekleştirebilirsiniz.

Kurulum

Velocesoft.IYS paketini NuGet üzerinden projenize eklemek için aşağıdaki komutu kullanabilirsiniz.

dotnet add package Velocesoft.IYS

Başlarken

Paketi projenize ekledikten sonra, API'yi kullanmaya başlamak için öncelikle bir Config nesnesi oluşturmalı ve API istemcinizi yapılandırmalısınız.

using Velocesoft.IYS.Client;
using Velocesoft.IYS.Models;

var config = new Config
{
    BaseURL = "https://api.iys.org.tr",
    UserCode = "your_user_code",
    BrandCode = "your_brand_code",
    Username = "your_username",
    Password = "your_password"
};

var apiClient = new Api(config);

Kimlik Doğrulama

IYS API'sine istek göndermeden önce, kimlik doğrulama yapmanız ve bir erişim tokeni almanız gerekir.

var isAuthenticated = await apiClient.AuthorizeAsync();

if (!isAuthenticated)
{
    Console.WriteLine("Kimlik doğrulama başarısız.");
    return;
}

İzin Oluşturma

Kullanıcı izni oluşturmak için, bir Request nesnesi oluşturup CreateConsentAsync metoduna gönderin.

var consentRequest = new Request
{
    Recipient = "user@example.com",
    RecipientType = RecipientType.Individual,
    Type = ConsentType.Mail,
    Source = ConsentSource.Web,
    Status = ConsentStatus.Accept,
    ConsentDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
};

var response = await apiClient.CreateConsentAsync(consentRequest);

if (response != null)
{
    Console.WriteLine($"İzin oluşturuldu: {response.TransactionId}");
}

Hata Yönetimi

API istekleri sırasında oluşabilecek hatalar ErrorHandler sınıfı aracılığıyla yönetilir. Hatalar, istemci tarafında loglanabilir veya kullanıcıya uygun bir şekilde gösterilebilir.

Lisans

Bu kütüphane MIT lisansı altında yayımlanmıştır. Daha fazla bilgi için LICENSE dosyasına bakın.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1 112 2/7/2024
1.0.0 94 2/7/2024