Messager.EskizUz 2.0.0

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

// Install Messager.EskizUz as a Cake Tool
#tool nuget:?package=Messager.EskizUz&version=2.0.0                

Tavsif

Messager, SMS xabarlarini yuborish uchun ma'lum Eskiz.uz API xizmatidan foydalanish uchun yaratilgan .NET kutubxonasi. U bir martalik parollar (OTP) va odatiy matnli xabarlarni yuborish jarayonini sodda funksionallik orqali osonlashtiradi.

O'rnatish

Messager NuGet paketini quyidagi buyruq yordamida o'rnatishingiz mumkin:

dotnet add package Messager.EskizUz

Boshlash

Messagerdan foydalanish uchun siz e-mail va maxfiy kalitni taqdim etib, Messager klassining misolini yaratishingiz kerak. Klass autentifikatsiya va belgilangan so'rov uchun belgilangan to'kenni olishni avtomatik ravishda boshlaydi.

using Messager.EskizUz;

// Messager obyektini yarating
var messager = new MessagerAgent("sizning-email@example.com", "sizning-maxfiy-kalitingiz");

OTP SMS Yuborish

Messager orqali OTP SMS xabarlarni osonlik bilan yuborishingiz mumkin. Telefon raqamiga bir martalik OTP kod yuborish uchun SendOtpAsync metodidan foydalaning.

// OTP SMS yuborish
var natija = await messager.SendOtpAsync("+998901234567");
if (natija.Success)
{
    Console.WriteLine($"OTP muvaffaqiyatli yuborildi. Kod: {natija.Code}");
}
else
{
    Console.WriteLine("OTP SMS yuborishda xatolik yuz berdi.");
}

Odatiy SMS Yuborish

SendSMSAsync metodidan foydalanib odatiy matnli SMS xabarlarni yuborishingiz mumkin.

// Odatiy SMS yuborish
var yuborildi = await messager.SendSMSAsync("+998901234567", "Salom Messager.EskizUz dan!");
if (yuborildi)
{
    Console.WriteLine("SMS muvaffaqiyatli yuborildi.");
}
else
{
    Console.WriteLine("SMS yuborishda xatolik yuz berdi.");
}

Muhim Eslatmalar

Ma'lum email va maxfiy kalitingiz bilan "sizning-email@example.com" va "sizning-maxfiy-kalitingiz" ni almashtiring.

Ogohlantirish

Ushbu kutubxona sodda shaklda taqdim etilgan va har bir yuz berishi mumkin bo'lgan xatolar boshqaruvini o'z ichiga olmaydi. Sizning mahsulotingizga mos ravishda xato boshqaruvini yanada rivojlantirish tavsiya etiladi.

Litsenziya

Ushbu kutubxona MIT litsenziyasi asosida tarqalgan.

Product 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. 
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
2.0.0 295 12/21/2023
1.1.0 130 12/21/2023
1.0.0 117 12/21/2023